News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[BUG] Incorrect rounding with Tax Percents

Started by j_vovus, February 22, 2012, 13:29:47 PM

Previous topic - Next topic

j_vovus

Hi

I experience following problem with rounding (example with demo products installation):
In cart:
1. Name: Hand Shovel
    Qty: 2
    Price: 3.39 € (product_item_price)
    Discount: 2 €
    Tax: 9.25%

2. Name: Weight Shipping
    Price: 6 €
    Tax: 5%

Total: 9,70 €

But with simple formula:
Total = 2*(3.39*1.0925-2)+6*1.05 = 9.70715 ~ 9.71
we have 1 cent imprecision with mathematic rules rounding.

My payment provider verifies total mount with such calculations and if total amount != calculated amount it fails.

P.S.: With Qty=1 this example is ok, because rounding remainder (the third symbol after point) less then 5.

j_vovus