33 minutes ago, EvaF said:My mistake - I have fixed it in response above
Hello @EvaF and @D. Tengler thanks for all your hell.
But with your income the total is wrong anyway, so lets see my image from cart.
All the math with total product with shippment (all without tax) is right but when the tax field comes it blows all
I'm in Portugal and in this client all product and shippment is 23% tax.
So the math is:
Total Tax = [Total products + shippement (without tax)] * 0.23 (and the problem is in here with round prestashop*)
Total Order = [Total products + shippement (without tax)] + Total Tax
* in math, rounds are made like (let's say 2 decimal)
1,234 it becames 1,23
1,235 it becames 1,24
So 3 decimal if is 5 or more, 2 decimal is up...and 3 decimal goes away
So 3 decimal if is 4 or less, 2 decimal stays the same...and 3 decimal goes away
If you have any ideias please help i'm all messed up
It also can be hardcoded, because i only will work with tax 23%
I've implemented @EvaF code and this is the result....
In tax field where is 16,20 it should be 16,17 because 70,30*0.23= 16,169 (and round it will be 16,17)