Skip to Content
0
Feb 01, 2019 at 12:29 PM

Use DI API to calculate discounts at Item level

345 Views

Dear experts,

I am using DI API to create sales order from an XML file. I have an issue with discounts at item level. Namely, the application successfully creates the sales order with the calculated discount at document level. However the customer needs the discounts to be displayed at the row level which is not the case. See below screenshot

The discount at document level has been calculated automatically by B1. What I provided in the application via DI API was

- Document_Lines.Price field with the line subtotal before discount

- Document_Lines.PriceAfterVAT with the line total after discount.

Is there a way to use the DI API so as to have a discount value at the column Discount % for each Item?

Kind regards,

Konstantinos