Hi DW
We have an issue with how VAT are calculated when running live integration towards a BC Cloud version 18 with code unit version 1.2.0.17. New pricing feature is ON for this client.
We have created an order with several order lines and VAT of 25% should be applied to the order. Problem is that it seems like the order total fields, OrderPriceWithVat and OrderPriceWithoutVat are calculated by summing the fields from the order lines (with and without VAT) instead of calculating by an specific rate of VAT. This means that for a specific order we get the following response from BC:
The order should be applied 25% VAT rate, so the issue is the following:
- OrderPriceWithVat from XML is 828.66
- OrderPriceWithoutVat from XML is 662.92
- OrderPriceVat from XML is 165.74
- Calculating with rate of 25% then 662.92 * 0,25 = 165.73 and not 165.74
- Calculating with rate of 25% then 662.92 * 1.25 = 828.65 and not 828.66
This is also what is reflected on the sales order in BC:
Again this seems to be the case because the VAT fields on each order line is rounded and then in the end summed to give the order total giving this issue with totals that doesn't match. With live integration disabled it seems like DW is calculating order totals correctly.
BR Chris