Skip to:
create and complete AR Invoice
create and complete AP Invoice
Create Allocation and add 2 invoice to lines
complete Allocation then posting get error NPE (Posting Error (java.lang.NullPointerException))
reference example:
or add bellow unit test to AllocationTest and run it
Reason:
Doc_AllocationHdr.createFacts
bpAcct is ACCTTYPE_C_Receivable in case AR invoice
bpAcct is ACCTTYPE_V_Liability in case AP invoice
Doc_AllocationHdr.createInvoiceRoundingCorrection
it query posting of invoice use bpAcct, but value of bpAcct depend on kind of invoice on last allocation line
so in case last allocation line is AR Invoice then Doc_AllocationHdr.createInvoiceRoundingCorrection for AP invoice get NPE and vice versa
Hi here is the patch for the NPE on the view allocation if you allocate AP Invoice to AR Invoice.
create and complete AR Invoice
create and complete AP Invoice
Create Allocation and add 2 invoice to lines
complete Allocation then posting get error NPE (Posting Error (java.lang.NullPointerException))
reference example:
or add bellow unit test to AllocationTest and run it
Reason:
Doc_AllocationHdr.createFacts
bpAcct is ACCTTYPE_C_Receivable in case AR invoice
bpAcct is ACCTTYPE_V_Liability in case AP invoice
Doc_AllocationHdr.createInvoiceRoundingCorrection
it query posting of invoice use bpAcct, but value of bpAcct depend on kind of invoice on last allocation line
so in case last allocation line is AR Invoice then Doc_AllocationHdr.createInvoiceRoundingCorrection for AP invoice get NPE and vice versa