I have a store that is configured to store product prices as inclusive of tax. In the tax configuration, I have 'Tax Calculation Method Based On' set to Total.
On some orders that have discounts, I have noticed strange rounding issues. For example, an order that contains 3 lines, totalling £290, with a discount of £65, has one of the order lines with a line total of £55.01, instead of £55 (which is the correct product price) – making the order total £225.01, rather than £225.
What is the cause of the above, and can changing the 'Tax Calculation Method Based On' setting influence this?
Best Answer
This is probably related to the famous magento rounding bug.
As a solution you can copy
/app/code/core/Mage/Core/Model/Store.php
file to/app/code/local/Mage/Core/Model/Store.php
and modify theroundPrice()
method to round with 4 digits: