IBM Support

Why is the API getOrderInvoiceDetails API retrieving line charges and invoices that are not associated with it?

Troubleshooting


Problem

Consider the following scenario- 1. Create an order with 2 qty of 1 item having $5 of line charges and $5 of line taxes 2. Ship one quantity and invoice it. Ensure that this invoice includes the charges and taxes 3. Ship the second quantity and invoice it. This invoice contains only the unit price of the item Call getOrderInvoiceDetails for the invoices. It is seen that the API returns the charges and taxes against the line for the second invoice as well

Cause

This is due to incorrect usage of the API template

Diagnosing The Problem

The supported output template needs to be followed. Please refer to the java docs for this information

Resolving The Problem

The Line charges and line taxes attributes were passed incorrectly in the following path-
/InvoiceDetail/InvoiceHeader/LineDetails/LineDetail/OrderLine/LineCharges/LineCharge
/InvoiceDetail/InvoiceHeader/LineDetails/LineDetail/OrderLine/LineTaxes/LineTax

The following path adhering to the java docs helped ensure that only the charges and taxes associated with a particular invoice were returned by the API -
/InvoiceDetail/InvoiceHeader/LineDetails/LineDetail/LineCharges/LineCharge
/InvoiceDetail/InvoiceHeader/LineDetails/LineDetail/LineTaxes/LineTax

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.3;9.4;9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg22013368