Jump to content

Tax totals wrong because of rounding the ex tax price


Destiny84

Recommended Posts

I have a problem with taxes on invoices. 
An example of the problem is the following; items cost 99 cents tax included. Tax rate is 21% , which cones to a price of 0.81818 tax excluded. 
The customer buys 30 items. The invoice shows 

Product total (tax excluded ) 0.82 * 30 = 24.60
Product total (tax included)  0.99 * 30 = 29.70
Total tax                 29.70 - 24.60 =  5.10


While the real tax exl. total should be 0.818181 * 30 = 24.545 

The tax calculation is off by almost 6 cents in this case, which is a huge deal. 

I took a look in the order_detail and order_detail_tax tables in the database and noticed all values being stored were rounded which explains the errors. 
I think however that the unit_price_tax_excl should be equal to original_product_price (which are 0.820000 and 0.818182 resp.), OR the original_product_price should be used for tax calculation. 

 

Is there anything I can do about this? Is this by design because taxes work differently where Prestashop is developed (France I suppose), or is this a bug? 

Any help would be gladly appreciated. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...