We're updating the issue view to help you get more done. 

NPE receiving ESCI invoices missing tax information in AllowanceCharge

Description

If a UBL invoice is missing tax information for AllowanceCharge elements, the following NPE is generated:

1 2 3 4 5 6 7 org.openvpms.esci.adapter.util.ESCIAdapterException: ESCIA-0700: Failed to process Invoice 0001912078 for supplier Foo and stock location Bar (527725): null Caused by: java.lang.NullPointerException at org.openvpms.esci.adapter.map.invoice.InvoiceMapperImpl.checkTaxCategory(InvoiceMapperImpl.java:394) at org.openvpms.esci.adapter.map.invoice.InvoiceMapperImpl.mapCharge(InvoiceMapperImpl.java:679) at org.openvpms.esci.adapter.map.invoice.InvoiceMapperImpl.map(InvoiceMapperImpl.java:256) at org.openvpms.esci.adapter.dispatcher.invoice.InvoiceProcessor.process(InvoiceProcessor.java:117) ... 53 more

For ESCI, the TaxCategory and TaxSubtotal elements are required. An appropriate error needs to be raised if they are missing.

Environment

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Components

Fix versions

Affects versions

1.7

Priority

Minor