Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Same Sub Totals - Different Tax calculation!

Same Sub Totals - Different Tax calculation!

Locked

Views: 1,093

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
10 Jun 2008, 9:42 AM
#1
guyp avatar

guyp

New Zenner

Join Date:
May 2006
Posts:
17
Plugin Contributions:
0

Same Sub Totals - Different Tax calculation!

Hello all,

How is it possible that Zencart can calculate 2 different amounts of tax from exactly the same sub totals and shipping charges?

Zen Cart v1.3.8a

An order in my cart contains 35 items, there are multiples of the same product in different colours. So 2x blue products A's, 2x yellow products A's etc

The sub total is £151.50.
There is a £10.00 Delivery Charge, both are subject to tax (VAT 17.5%).

The calculated VAT is

151.50+10 = 161.50

161.50 x 0.175 = £28.27

it should be **£28.26 ** (rounded from 28.2625)

By varying the quantities of the items (but keeping the total quantities and values the same), the cart will calculate VAT of either £28.26 or £28.27! Somehow it is finding 0.04p difference!

Any Ideas??

Thanks

Guy

10 Jun 2008, 10:34 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Same Sub Totals - Different Tax calculation!

Looking through the threads after searching for 'rounding' it looks like the problem is that Zencart calculates the tax on each item before it adds it to the total. If true, I'd consider that a bug.

One suggestion was to extend your prices to 4 decimal places (or more). I have no idea if that will help.

10 Jun 2008, 10:46 AM
#3
guyp avatar

guyp

New Zenner

Join Date:
May 2006
Posts:
17
Plugin Contributions:
0

Re: Same Sub Totals - Different Tax calculation!

Hi Stevesh,

Thanks for your reply. If we apply 4 decimal places to the currency options (so that 4 decimals appear on the site). The calculations come out the same!

Even if zen cart is calculating tax on each individual item before adding them all together, changing the quantities of the items in the cart should not make a difference as they are the same price!

I'm sure that the rounding is ok, just the changing calculations!

Guy