i have been spending the last 2 weeks trying to solve rounding issues on my magento installation, i have already searched on google, i have already read all the posts here on stackoverflow but nothing seems to help.
This is where rounding error occur
As you can see in the image we have:
- total: 308,72€
- total with tax (iva 22%): 376,63€
- total expected: 308,72*1,22 = 376.6384, with rounding UP: 376,64€
- so tax is 1 cent less, which is a big problem
- the problem seems to appear in a random way, i couldn't find any patterns or condition which cause this issue.
Here some info about the environment:
- Magento version 1.9.1 (still need to update to SUPEE-8788)
- CoolBaby Theme (latest version)
- Plugin used:
- 1)PHOENIX Magento-CashOnDelivery
- 2)Extendware: Full Page Cache
- 3)Extendware: Minify css/js
- Mysql Version: 5.6.33
- Php Version: 5.5
Here are some solutions and config combination i have already tryed:
- Disable all plugins
- Change the roundPrice function to 4 decimal instead of 2
- Creating a new magento 1.9.1 installation using the same db
- Changing calculation mode, none of the 3 options resolve the problem, actually the best method seems to be "Total"
- Changing "Price include taxes" in calculation mode config
- Changing Cash on Delivery fee include tax
- Changing Shipping Cost include tax
In my catalogue i have a lot of products with very small price but the problem appear also when all prices have only 2 decimal.
A strange fact is this: in the example i have COD which is 10€ with vat included, if i remove COD and i add a product with the same price (10€ with vat), the total with taxes is correctly rounded to 376,64€
Maybe i'm missing something, i don't know, i'm not so expert with magento, but i really don't know what to check now, any advices or idea will be appreciated