Posted on 13/05/2024 16:57:05
Hi Stepen
It is calculated like this:
Price.Substract(TotalOrderDiscount).Substract(PaymentFee).Substract(ShippingFee).Substract(TotalTax)
Do you have any price logic on your orders?
You can try to apply the 'CartCheatSheet' template to your cart - it will show you each price element and its price, vat etc. https://github.com/dynamicweb/Swift/blob/main/Swift/Files/Templates/Designs/Swift/eCom7/CartV2/Step/CartCheatsheet.cshtml'
There is an older view of it here: https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/dw-9-10-12-external-payment-fee-not-included-in-order-total
When using the cheatsheet, you can see all calculations, and information on each price object.
If you have integration or other logic that fiddles with the order or orderline prices, you can accidently set the price to the same with and without vat. Or you can set orderlinetype to type.fexed which will cause DW to not calculate prices and take care of VAT.
Lastly you could also have a vat country on the order where there is no VAT percentage related to the country -. as it is the delivery (or vat country) that controls the VAT percent.
BR Nicolai