VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: sharp on July 17, 2013, 10:25:51 AM

Title: Item tax wrong rounding in cart
Post by: sharp on July 17, 2013, 10:25:51 AM
Hello,
i have a problem with the tax in the cart.

If a customer adds a product with price of 0.55 and 500 pieces (0.55*500 = 275 without tax). Virtuemart calculates a tax amount of 52.25 (seen via vmdebug) but displayed 50.00 and adds this to the sales price 325 (275+50). This is the wrong sales price because the tax amount is incorrect. The tax value is 19%. Correct Tax amount is 52.25 so the sales price is 327.25 (275+52.25).
I have figured out that i got only the rightly tax amount if i set the runding digits to 5 for tax amount. The output looks like 52.25000

So i think Virtuemart rounds wrong or has a problem with the Digits after the comma. Because it's rounds 52.25 to 50. This is mathematically right but not for the tax (display). It should only round to the second digits after the comma.

I have this problem only at items in cart. The total tax will displayed correct.

Is there a way to fix that virtuemart round the tax of items wrong?