Price calculation and rounding
ZC version = 1.3.9h
I'm puzzled; as far as I'm aware, most major currencies work to 2 decimal places, so why does ZenCart use 4 decimal places for price/tax calculations?
We have a tax rate of 20%
The price of the item inc tax is £7.28
If you enter £7.28 as the GROSS price, the nett price will be calculated as 6.0667.. So when the customer adds 400 to cart, then the total becomes 6.0667 x 1.2 x 400 = 2912.016 which will round to 2912.02
If you are enter a NETT price of 6.07, then the gross price displayed on the product collect info page in admin will be 7.284, but will round down for DISPLAY to the customer as 7.28; when ordering 400, the calculation becomes 6.07 x 1.2 x 400 = 2913.6
So in both instances above, the customer is not happy because the total displayed is clearly not 7.28 x 400 which = 2912
Is the only way to avoid this to ensure all nett prices are only 2 decimal places and end in either .00 or .05 ?
The quantities are not unrealistically large for the site in question.
The JSWeb Team
PCI Compliant Host Provider (UK/IRELAND) - ZenCart Specialists
By BillNally in forum General Questions
Last Post: 30 Mar 2011, 08:04 PM
By tatiana77 in forum Setting Up Categories, Products, Attributes
Last Post: 24 Nov 2007, 06:12 AM
By Alex Clarke in forum General Questions
Last Post: 29 Oct 2006, 03:41 PM
By sylsau in forum General Questions
Last Post: 9 Aug 2006, 05:48 AM
Content and Graphics Copyright (c) 2003 - 2013 Zen Ventures, LLC - all rights reserved
Zen Cart® is a Registered Trademark of Zen Ventures, LLC