Forums / Bug Reports / Sales tax calculations incorrect.

Sales tax calculations incorrect.

Locked

Views: 13,051

Results 21 to 40 of 40
This thread is locked. New replies are disabled.
8 Jul 2008, 4:54 AM
#21
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Sales tax calculations incorrect.

Thanks for checking, Tick.

No, I have only one tax zone defined. Yes, I'm running 1.3.7; I was going to try to go live and then upgrade to 1.3.8. Does 1.3.8 handle sales tax correctly in both of the 2 instances I cited today? Doing 1.3.8 will require upgrading COWOA as well, since the COWOA code is different, but maybe I need to consider it.

hedera

Nature bats last.

9 Jul 2008, 4:21 AM
#22
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

hedera:

Thanks for checking, Tick.

No, I have only one tax zone defined. Yes, I'm running 1.3.7; I was going to try to go live and then upgrade to 1.3.8. Does 1.3.8 handle sales tax correctly in both of the 2 instances I cited today? Doing 1.3.8 will require upgrading COWOA as well, since the COWOA code is different, but maybe I need to consider it.

I believe it calculates correctly in both instances. You are referring to the cart calculation and the order total, correct? I've attached a screenshot so we can be sure we're on the same page.

Generations Crafting (Our Zen-Cart storefront)
"
And that's just it, Doc - my mind has always been my Achilles' heel!" -- The Tick

9 Jul 2008, 5:18 AM
#23
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Yes, that's correct - and mine isn't. I'm reviewing the upgrade instructions for getting to 1.3.8, I think that's what I have to do, sigh.

hedera

Nature bats last.

16 Jul 2008, 5:31 AM
#24
marco_k avatar

marco_k

New Zenner

Join Date:
Jan 2008
Posts:
22
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Is there any progress for this problem (in V1.3.7)?

16 Jul 2008, 6:53 PM
#25
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

I regret to say that there is no support for this problem in 1.3.8. I upgraded my site yesterday, and today I ran the test order for 10 items at $6 each. The tax is still calculated at $5.20 instead of $5.25. I thought this was supposed to be fixed in 1.3.8. I will apply the 3 digit patch, but I thought the new version was supposed to fix this.

This is really discouraging, folks. I can't go live like this.

hedera

Nature bats last.

17 Jul 2008, 12:54 AM
#26
tick avatar

tick

New Zenner

Join Date:
Jun 2007
Location:
Phoenix, AZ
Posts:
66
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

hedera:

I regret to say that there is no support for this problem in 1.3.8. I upgraded my site yesterday, and today I ran the test order for 10 items at $6 each. The tax is still calculated at $5.20 instead of $5.25. I thought this was supposed to be fixed in 1.3.8. I will apply the 3 digit patch, but I thought the new version was supposed to fix this.

Ok, we have two possibilities:

  1. I did not reproduce the steps of your test accurately.
  2. Something is different between my stock install of Zen and your setup.
    I think I reproduced your test correctly. Do you have any addons installed that affect product pricing? Are your includes/functions/functions_prices.php and includes/functions/functions_taxes.php files exactly the same as the ones in a stock Zen release? Do you display prices with Tax included? (I did not on my stock site.)

Have you tried setting up a stock installation of Zen and seeing if your test works?

Generations Crafting (Our Zen-Cart storefront)
"
And that's just it, Doc - my mind has always been my Achilles' heel!" -- The Tick

17 Jul 2008, 2:14 AM
#27
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Yeah, the test is pretty simple. My upgrade didn't produce a "stock" install, as I'm being pushed to bring the site live, and I tried to get everything up together.

I'll have to check the 2 files you mention. I have got a "stock" install on my local drive, it just isn't what I loaded. I don't display prices with tax included.

I have 2 add-ons installed: the Checkout Without Account add-on, which shouldn't come anywhere NEAR product pricing; and the Better Together add-on, which allows me to "link" a product in category A with all the products in category B, so that if someone orders the A product and any of the 5 products in B, the A product is free. The reason I don't think that's the cause is that you install Better Together by loading 3 net new files, and there's no overlap with the files you mention. In fact, I'm quite sure I've never done anything with the

/includes/functions

directory at all.

I hate to have to do another install to check this but I may have to.

hedera

Nature bats last.

17 Jul 2008, 2:33 AM
#28
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Tick,
Just verifying. I went downstairs and checked the "stock" files against the files on my site. These two files:

includes/functions/functions_prices.php
includes/functions/functions_taxes.php

are identical in my cart and in the stock directory.

hedera

Nature bats last.

17 Jul 2008, 2:57 AM
#29
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

I just ran the test again with the same (wrong) result. Here it is in detail, in case we're assuming different things:

I have a single tax zone, California, with a tax rate of 8.75%. My cart has 11 different items, each costing $6. (On https://www.liferingtest.com it's the items under "Brochures.") I place an order, from a California address, for 1 copy each of 10 of these items (to make the math easier). Total cost is $60. Total tax should be $5.25 ($6 times .0875 is $ .0525), but is calculated as $5.20.

Please note: if I ordered 10 copies of 1 of these items, also for a total of $60, the tax would be correct. The larger the single line order amount, the more likely the tax calculation will be correct. The problem with my test is that each line item is only $6.

I also have a situation where if you order 2 items, the "Bylaws" (under Books) and the "Brochure Sampler" (under Brochures), the total taxable cost of the item is $1 (Bylaws is $1 and the sampler is free with any Book - that's Better Together at work). The tax here should be $ .09 ($ .0875, rounded) and it calculates as $ .08, because the stupid program doesn't round.

I'd hate to have to raise the prices just to get the tax to calculate correctly; that's very bad juju.

hedera

Nature bats last.

25 Jul 2008, 2:59 PM
#30
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

For the record, I am having the same issue and since I just now noticed it, it's costing me over $1000 in uncollected taxes due to the miscalculation.

It doesn't seem like it should be a hard modification for the zen cart team to address.

Here is an example order from our site:

Item 1: $43.65
Item 2: $24.20
Item 3: $19.35

Sub-Total: $87.20
Priority Mail (2 - 3 days): $6.40
10% Coupon: -$8.72
Tax: $4.39
Total: $89.27

As you can see, the collected tax was only $4.39, but it should have been $87.20 minus the $8.72 discount = $78.48 x 0.0725 = $5.69 tax!

Can't this issue be resolved?!?

  • Jeff
25 Jul 2008, 3:13 PM
#31
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Ok - This MAY be resolved, although I have only done one test.

I went to Admin -> Order Total and edited my ot_coupon module. When I went to edit it, I noticed that there was a section in there called:

Include Tax
Include Tax in calculation.
[ ] True
[ ] False

However, there was nothing selected. Almost like this feature was added during an upgrade and it was never initialized.

So I put FALSE in that value, and placed a test order. It appears to be working with that test order. Perhaps some of you who are also having this same problem can verify this on your end as well.

  • Jeff
30 Jul 2008, 8:50 PM
#32
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Jeff, I hope that helps you, but it doesn't help me - that is a setting in the ot_coupon module, which isn't even installed on my site - we don't do discount coupons.

I still need something which will reliably calculate sales tax at 8.75% without truncating to a lower value; this means it has to be rounded. I'll even give you a pseudo-code routine for rounding: Calculate the tax to 3 digits past the decimal; if the 3rd digit after the decimal is >=5, increment the second digit after the decimal by 1. In fact, if someone will tell me where the master class is, I'll try to write it myself.

Is anybody listening here?

hedera

Nature bats last.

31 Oct 2008, 7:53 PM
#33
dreamz avatar

dreamz

New Zenner

Join Date:
Oct 2007
Posts:
52
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Haven't been around for a while. My fix works mostly, but it still screws up on some sales by a few pennies. It's maddening. Why can't there just be a compute tax on order instead of line item. Even more curious - why don't any of the zenners answer this post and the bug report on it. It's obviously a bug and a flaw.

Has anyone had complete success with this yet?

31 Oct 2008, 9:34 PM
#34
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

I went back to my business partner and they decided we would simply accept the risk that on small orders the tax would be incorrect. Implementing the fix that makes tax calcuations 3 digits has solved the issue for all but a few very small orders, on the order of $1-$3, and we decided simply to risk this. If you don't know that fix, I don't recall the post number but it was around July 17 (based on notes in my project diary) and involved a modification to /includes/classes/order.php.

As far as I can tell, the zenners aren't responding to this because they don't think it's a problem. I've seen some posts along the lines of "it's working as designed, what's wrong with it?"

I'm in the process of teaching myself PHP and Javascript and if I can successfully figure this out, I may submit a fix myself, but don't hold your breath.

hedera

Nature bats last.

17 Nov 2008, 11:12 PM
#36
chris32882 avatar

chris32882

Zen Follower

Join Date:
Oct 2008
Location:
Hornell, NY
Posts:
330
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

I am having issues with my tax not calculating right as well. I set it up for 8% for my State and county. I have to have individual tax rates for each county and outlaying areas. I do a mock order for about $60 the tax is $.76 is not right, not sure what I am doing wrong..any help will be appreciated

Have you visited the (un-official) Zen Cart IRC channel yet?
irc.freenode.net ##zencart

18 Nov 2008, 9:18 AM
#37
stevesco avatar

stevesco

New Zenner

Join Date:
Jul 2008
Posts:
7
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

My German is about as good as a chocolate fireguard. Can anyone give us any more info about the patch on the german forums please.

regards

Steve

20 Nov 2008, 11:30 AM
#38
hugo13 avatar

hugo13

Zen Follower

Join Date:
Apr 2004
Location:
vienna
Posts:
176
Plugin Contributions:
4

Re: Sales tax calculations incorrect.

stevesco:

My German is about as good as a chocolate fireguard. Can anyone give us any more info about the patch on the german forums please.
English is so easy for me as for you German :P

I'm sorry to tell that that patch only resolves a minor rounding problem; a product-price 9,99 was rounded up to 10,00

the next posters told about the tax-problem

I looked at that phenomenon & I think the problem is the rounding of all subtotals: vat of products is rounded, the order-fee and so on; at the same time this values will be formated & now its hard to calculate with that strings;
I think the only way ist calculate with at least 4 decimal places & round & format that values at a later time

at the moment I have to capitulate: too many places to manipulate

20 Nov 2008, 3:16 PM
#39
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,678
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

at the moment I have to capitulate: too many places to manipulate

Send a gift to HPDL for that. The joys of legacy code.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

20 Nov 2008, 4:19 PM
#40
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: Sales tax calculations incorrect.

Kim:

Send a gift to HPDL for that. The joys of legacy code.

Better yet, promise the gift but never deliver :)