IDEMPIERE-4440 NPE in DocAllocationHdr (#241)

This commit is contained in:
Carlos Ruiz 2020-09-04 21:38:20 +02:00 committed by GitHub
parent dcd7d6a41e
commit e93cdcb38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -420,7 +420,8 @@ public class Doc_AllocationHdr extends Doc
getC_Currency_ID(), null, line.getAmtSource().negate()); getC_Currency_ID(), null, line.getAmtSource().negate());
if (fl != null && payment != null) if (fl != null && payment != null)
fl.setAD_Org_ID(payment.getAD_Org_ID()); fl.setAD_Org_ID(payment.getAD_Org_ID());
allocPayAccounted = allocPayAccounted.add(fl.getAcctBalance().negate()); if (fl != null)
allocPayAccounted = allocPayAccounted.add(fl.getAcctBalance().negate());
} }
else if (isUsingClearing && line.getC_CashLine_ID() != 0) // Avoid usage of clearing accounts else if (isUsingClearing && line.getC_CashLine_ID() != 0) // Avoid usage of clearing accounts
{ {