News:

Support the VirtueMart project and become a member

Main Menu

Rounding problems with some articles

Started by maxxer, February 26, 2013, 09:24:20 AM

Previous topic - Next topic

maxxer

Hi.
Normally, we're used to add products using final price and let VM calculate the base price, normally with a VatTax of 21%.
Given a product with a final price of 5.5€, the calculated base price is 4.54545. A purchase order of a single item works fine, but when quantity rises problems show up.
Say you buy 6 items of this:
Base price: 4.54545
Final price: 5.5
Order subtotal (in database): 27.3
Order subtotal (manually calculated): 4.54545*6 = 27.2727
Why this discrepancy?

Summing order summary everything is fine, because adding 9€ of shipping to the above you get:
Subtotal: 27.3 base + 5.7 tax = 33€
Shipping: 7.44 + 1.56 = 9
Total: 34.74 + 7.12= 42
And the order subtotal is correctly 42.00 on the order.

The problem is that doing the manual math:
27.3+7.44 = 34.74
34.74 + 21% VAT = 42.0354

The last value, rounded, is 42.04, which differs by 0.04€ from the printed values.
This is a big problem because we use VM for invoicing, and values are not correct.
Is this a problem of us only?

I tried setting all prices rounding to 2 in VM config (Configuration > Prices), but there's no change at all.


Thanks

maxxer

MY MISTAKE!

Enabling "Rounding only on display" fixed my issue!