Developer forum

Forum » Ecommerce - Standard features » Inc and Ex VAT amounts showing the same

Inc and Ex VAT amounts showing the same

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

I am having difficultly with the orderdetails template in the swift customer experience center

Its showing the same total value with and without VAT

I have checked the numbers in the ecomorders table and they are def different for with and without vat

The incorrect value seems to be originating from the Model.TotalPriceWithoutOrderDiscountsAndFeesAndTaxes.Price property, but I cannot find the TotalPriceWithoutOrderDiscountsAndFeesAndTaxes property in the ver 9 api docs.

Does anyone know where this property is and why it is misbehaving?

 

Cheers

//Steve


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

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

 

You must be logged in to post in the forum