Hi guys,
I'm trying to change the VAT on my orders when a user selects a country within the EU and has entered a VAT number.
I've tried different approaches but i have not found a working solution yet, the all have issues.
The closest i've come to doing it is the following code:
double calculatedVat = ( (order.Price.PriceWithoutVAT + order.PaymentFee.PriceWithoutVAT) / 100) * newVAT; order.AllowOverridePrices = true; order.VAT = newVAT; order.Price.VAT = calculatedVat; order.Price.VATPercent = newVAT;
This correctly changes my VAT, but it prevents the total price from being calculated, making it so all fee's are ignored.
I'd like to change the VAT and still have DW do all the math, is that possible?
Mvh
Martin