Magento Forum

   
CRITICAL: Tax Calculation Flaw in All Versions of Magento
 
hydra
Guru
 
Avatar
Total Posts:  378
Joined:  2008-08-26
Amsterdam
 

Bump.
-
Unbelievable how the dev team can completely ignore the forums lately.
I guess they are only there for the paying customers nowadays.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentonewbie
Jr. Member
 
Total Posts:  13
Joined:  2008-02-14
 

infradawn has added this to the Magento Issue List:  #15194

Hopefully Magento will find some resolution to this issue.

Cheers,

DC

 
Magento Community Magento Community
Magento Community
Magento Community
 
infradawn
Jr. Member
 
Total Posts:  24
Joined:  2008-02-02
White Peak UK
 

This is more for the benefit of the Magento team who will hopefully include this thread in review of bug #15194.

Where catalog products exclude tax a rounding error is introduced in the calculated taxed price of each item. For each item in the cart the maximum rounding error is ±0.005. (I use the term “item” to mean any product appearing on a single row in the cart regardless of quantity.)

To use a previous example: A 10.00 item with 8.25 sales tax has a taxed price of 10.825. Magento rounds this to 10.83; an error of 0.005. Magento calculates the total sales tax as the sum of the individual item sales taxes. The tax calculation error is therefore cumulative.

In the worst case scenario where every item in the cart generates the maximum rounding error, 10 items gives an error in the calculated total tax of 0.05, 100 items 0.50, 1000 items 5.00, etc.

In reality if store prices are ‘distributed’ and a cart contains many items the rounding errors will tend to cancel each other and mitigate the problem. Even to the extent that it may not be apparent that there is a problem. Consider a cart containing:

1 x 10.00 +8.25% = 10.8250 rounded to 10.83    (noterounded up)
1 x  5.00 +8.25% =  5.4125 rounded to  5.41    (noterounded down)
1 x  5.00 +8.25% =  5.4125 rounded to  5.41    (noterounded down)

Giving a total tax of 1.65 which is correct!

Just as a final exercise in the spirit of reductio ad absurdum, consider a store that has all products priced at 0.06. No product may be ordered in a quantity greater than 1 and sales tax is 8.25%. 100 different products are ordered. Magento will calculate the total sales tax to be 0.00.

There is a defect in the Magento tax calculation method which complicates tax reconciliation and, depending on territory, may be out of compliance with relevant legislation. The consequences for store owners are not trivial. I would urge that this defect be given priority attention.

Thanks

iD

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

yeah, just encountered this problem as well now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MarkNewby
Member
 
Avatar
Total Posts:  32
Joined:  2008-10-06
MD of Camiloo Limited
 

Phew, I’m glad I’m not the only one having this issue. Spent 6 hours today trying to debug this.

Had a very strange issue this morning with an order having the discount applied multiple times or something similar.
Modified the code, but fell over at ye olde ‘one cent / one pence’ issue.

The paypal figure, if there is a discount, is one pence more than it should be.

I’m actively looking into ways of modifying the code. Will report back if I find anything.
Will also try the modification to the rounding of the subtotal [i.e. disabling it].

 
Magento Community Magento Community
Magento Community
Magento Community
 
EURO
Jr. Member
 
Total Posts:  23
Joined:  2009-02-26
 

I don’t understand why Varien will not fix this. This error makes Magento only usable with the use of a completely separated ERP system. Which reduces Magento to an expensive customer front-end.

I hope Varien informes enterprise customers about this error before the customers buy Magento Enterprise Ed. If I just payed 9k USD for a piece of software and I would discover such an error is known for a year by the software maker, I would sue the **** out of them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eduard Fabra
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-11-02
Spain
 

Damm! It’s incredible that Varien doesn’t solve this critical bug that they have in all Magento versions.
Still no solutions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
employment_background_check
Jr. Member
 
Total Posts:  1
Joined:  2009-07-23
 
dakman - 17 February 2009 04:57 PM

Been sooo swamped havent had a chance to dive into this. This has been on my mind lately and I want to get around to fixing it but I really need the community/magento’s help on this one.. This is a complicated fix because it doesnt just effect the way taxes are calculated but discounts as well.. but YES THIS IS a critical issue..

Thanks for the information man.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mage::ext
Jr. Member
 
Total Posts:  1
Joined:  2009-04-27
 

Hi,
i think i have a solution which can be consider stable, at least it works with all the test case we found around here…

http://www.mageext.com/MageExt_FixRound-0.1.0.rar

Let me know..

 
Magento Community Magento Community
Magento Community
Magento Community
 
dakman
Member
 
Avatar
Total Posts:  38
Joined:  2008-07-09
 

Hmm I wonder if they fixed this finally in 1.4… Can anyone confirm?

http://www.magentocommerce.com/download/release_notes#Release%20Notes%20-%20Magento%201.4.0.0-alpha1%20(August%2011,%202009)

Release Notes - Magento 1.4.0.0-alpha1 (August 11, 2009)
Improvements

* Rewritten taxes and discounts calculation

 
Magento Community Magento Community
Magento Community
Magento Community
 
EvanBrassart
Jr. Member
 
Total Posts:  13
Joined:  2008-08-19
Dallas, Texas
 

I’m now running in to tax issues w/ google integration.

Google’s tax rounding methods don’t match Magento’s so I can’t invoice orders purchased through google checkout because they are off by $0.01

Can’t wait for 1.4 to clean this up (hopefully)

 
Magento Community Magento Community
Magento Community
Magento Community
 
infradawn
Jr. Member
 
Total Posts:  24
Joined:  2008-02-02
White Peak UK
 

The biggest feature added in this release [1.4.0.0-alpha1] is the rewrite of the tax module to better work with EU/VAT taxation.

The rounding errors at the core of bug #15194 are not specific to any territory so there’s still a big question mark whether it’s addressed in 1.4.

iD

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gui
Guru
 
Avatar
Total Posts:  588
Joined:  2008-03-09
 

When I read the title of Magento’s new blog post I was hoping to read a improvement of the tax calculation. Unfortunately it just handles importing taxes, which in my opinion is a bit of a shame to use one of the few support tickets for, but anyway...the tax calculation really needs an overhaul guys! My bet is that you will have fewer support tickets on taxes!

 
Magento Community Magento Community
Magento Community
Magento Community
 
vinlair
Jr. Member
 
Total Posts:  2
Joined:  2009-10-01
 

1.4 cannot solve this. I’ve tried it but its still the same. It has bugs.

vinlair
Dossier de surendettement

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

http://www.magentocommerce.com/extension/2024/calcul-tva-fran-aise

Could help

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top