VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: lausianne on May 03, 2018, 14:51:54 PM

Title: Rounding bug - Totals don't add up correctly
Post by: lausianne on May 03, 2018, 14:51:54 PM
This bug is described in detail and discussed here:

https://forum.virtuemart.net/index.php?topic=139642.0

Brief:
Displayed:
Base price: 18.10, Total for 2 units: 36.10
But ... 18.10 x 2 = 36.20

Happens when several items are selected in product details, and in cart, and on invoice.
It will only happen when there are discounts or VAT or exchange rates applied after multiplication of the base price.

A solution would be to always calculate totals from multiples of the rounded base price.
Title: Re: Rounding bug - Totals don't add up correctly
Post by: K&K media production on May 04, 2018, 18:11:58 PM
This is answered in the original thread.

https://forum.virtuemart.net/index.php?topic=139642.0