IDEMPIERE-4324 Fix NPE on payment allocation (#115)

Co-authored-by: Orlando Curieles <orlando.curieles@ingeint.com>
This commit is contained in:
Carlos Ruiz 2020-06-16 14:06:36 +02:00 committed by GitHub
parent c0710da6cd
commit 36d6644879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -230,9 +230,10 @@ public class Doc_AllocationHdr extends Doc
{ {
fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()), fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()),
getC_Currency_ID(), line.getAmtSource(), null); getC_Currency_ID(), line.getAmtSource(), null);
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()); allocPayAccounted = allocPayAccounted.add(fl.getAcctBalance());
}
} }
else else
{ {