Zen Cart Logo
Forums / General Questions / ZC Getting Sums Wrong?

ZC Getting Sums Wrong?

Locked

Views: 1,320

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Dec 2008, 9:45 AM
#1
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

ZC Getting Sums Wrong?

Hi
Still using 1.3.7 I'm afraid but I have noticed in the past that there is the occasional 1p adrift in the total price on the invoice which I always assumed was in the rounding and lived with it.
But on this order it has failed to add VAT on one line, possibly due to its low value, but even then it doesn't account for the error in the total price.

The 'Total (inc)' on line 3 should be £0.58, but the overall total should be £9.97.

Where and why does ZC get it wrong?

Thanks
Pa

2 Dec 2008, 9:00 AM
#2
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

Just had another order with the total value a penny out.
Can someone at least point me to the php script that does the calculations so that I can attempt to work out whats going on?
Thanks
Pa

3 Dec 2008, 10:36 PM
#3
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

So I'm on my own with this one?

4 Dec 2008, 2:23 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: ZC Getting Sums Wrong?

I believe most of this starts in includes/classes/shopping_cart.php...
I do not have to use VAT & have never searched for it so this may or may not be there???
You should also check includes/modules/order_total

4 Dec 2008, 4:06 PM
#5
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

Thanks for the response Kobra.

Done some searching around this forum and it seems like I'm not alone and this problem was reported months ago, affects lots of users, but sadly, no signs of a 'clean' fix yet.

The 'dirty' fix is to increase currency decimal places to 3 (or more?), but then the extra places show in the checkout, invoice etc. etc.

Hmmm .....

1 Feb 2009, 12:50 PM
#6
myworld20091 avatar

myworld20091

New Zenner

Join Date:
Oct 2008
Posts:
85
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

i have the same issue after i have quantity discounts installed

have you found a solution ?

1 Feb 2009, 2:04 PM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

I stand to be corrected on this but I understand the issue relates to this:

ZC calculates tax (rounded) on each individual item, then SUMS the total.

This is compliant with USA accounting principles.

In the UK and EU, tax is generally calculated on the total of the PRE-TAX amount - so, the UK/EU adds up the pre-tax amounts, gets a sub-total, then calculates the tax, and adds this to the pre-tax sub-total to get the grand total.

... all the while ZC calculates tax FIRST on individual items (rounded), rather than on the pre-tax total of all items, UK/EU users of ZC will get discrepancies...

13 Feb 2009, 11:55 PM
#8
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
424
Plugin Contributions:
0

Re: ZC Getting Sums Wrong?

It not only for a taxed amount where the the 0.01 error occurs.

Here is an example of the sub total + the postage = the total - 0.01

Zen Cart v 1.3.7