Zen Cart Logo
Forums / Bug Reports / [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

[fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Locked

Views: 15,192

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
10 Feb 2008, 6:59 AM
#1
bobtabin avatar

bobtabin

New Zenner

Join Date:
Dec 2007
Posts:
15
Plugin Contributions:
0

[fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Fresh Install fo Zen Cart 1.3.8a

I have a major tax calculation issue when using either a Discount Coupon or Group Discount (not together). This is what occurs:

Sub-Total: $69.00
Standard Shipping (Standard Shipping): $7.15
Group Discount: -$34.50
Florida State Sales Tax - 6.00%: $2.29
Total: $43.94

As you can see the total does not calculate correctly. 69.00+7.15-34.50 (50%)= 41.65 * 1.06 (tax) = 44.15 (6% tax on $41.65 should be 2.49, not 2.29).

What's going on? Here are my settings and more comments below. This occurs with both modules. How do I fix this?

Group Discount

This module is installed
true

Sort Order
290
Include Shipping
false

Include Tax
false

Re-calculate Tax
Standard

Tax Class
--none--

I have tried both None and Standard for Re-calculating Tax.

Some how the discount is being applied to the shipping to.

I am trying to only allow the 50% off on the Sub-Total and NOT the Shipping. I though my options were correct, but the group discount is being applied to the shipping. With this scenario, the tax calculates correctly. How to I only allow a 50% discount on the Sub-Total and NOT the Shippig too, as per my settings reflect? This is a bug.?

10 Feb 2008, 11:24 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,691
Plugin Contributions:
56

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Change your sort order and move the discount ABOVE the shipping (in Admin->Modules->Order Totals).

10 Feb 2008, 2:34 PM
#3
bobtabin avatar

bobtabin

New Zenner

Join Date:
Dec 2007
Posts:
15
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

I tried every combination, including moving the Group Discount aboce the shipping. Here's what I am required to do:

I need to charge TAX on Shipping so I have my Tax Class as Taxable Goods within the table shipping module. I have set the Tax Class to None within the table module and everything calculates as it should.

HOWEVER, I am required to charge tax on shipping. So, how do I do the following (still not convinced it's not a bug, or a very confusing way to do things):

  1. Charge Tax on Products
  2. Charge Tax on Shipping
  3. Allow for Group Discounts and Discount Coupons

Doing all three causes calculatiosn (in every order I try) to be incorrect. Can you try this in a test store? I have tried this in a test store with no code modifications to the tax, order total, or shipping code. Thanks.

10 Feb 2008, 4:20 PM
#4
bobtabin avatar

bobtabin

New Zenner

Join Date:
Dec 2007
Posts:
15
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

*** Read my post above before reading this ***

I re-ordered the Group Discount to 150 (between Sub-Total and Shipping) as this is how I want to reflect it anyhow. The ONLY way I can get the TAX to show correctly is using Credit Note (see below):

Include Shipping
false

Include Tax
false

Re-calculate Tax
Credit Note

Tax Class
Taxable Goods

After doing so, the tax shows correct, but the total should be $44.15 (not $46.22).

Sub-Total: $69.00
Group Discount: -$34.50
Standard Shipping (Standard Shipping): $7.15
Florida State Sales Tax - 6.00%: $2.50
Total: $46.22

What I found it's doing is that the original tax (if no discount applied) is $4.57 and the difference between $2.57 and $2.50 is $2.07. Adding the CORRECT $44.15 TOTAL with the $2.07 makes $46.22. WHY is the Total ADDING the FULL SALES TAX as if a discount didn't apply ($4.57) while showing the correct $2.50 sales tax? I need it to show the correct sales tax and total.

I can duplicate this EXACTLY with both Discount Coupons and Group Discounts. The results and testing is the same!!! It's all based around my Shipping being taxable.

Here's my store requirments and what settings do I need?

All products are taxable to sales Shipping to Florida (tax basis is Shipping)
Shipping is Taxable to sales Shipping in Florida (tax basis is Shipping)
Group Discount and Discount Coupon subtract the discount and the tax and total indicate correct values.

How do I acheive this?

17 Mar 2008, 3:43 PM
#5
alan_powerbrixx avatar

alan_powerbrixx

New Zenner

Join Date:
Jul 2007
Location:
Durham, NC
Posts:
56
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

We have a similar (same?) problem showing up for us when a group discount is applied to an in-state (taxable) order. The sales tax is undercharged.

For us, the problem is more hypothetical than practical, because the only group discount we offer is to dealers who are normally tax exempt. Mostly, this reply is to let the Zen wizards know that we had discovered the same kind of error cropping up during testing, on in-state orders when a group discount is applied. In case it helps someone in solving, here are the total lines from a test case:

TOTAL LINES DISPLAYED DURING CHECKOUT:
Sub-Total: $7.99
US Postal Service (Priority Mail): $6.60
Group Discount: -$1.20
NC TAX: $0.84 [wrong!]
Total: $14.23

SOME OBSERVATIONS:
Tax is charged based on the shipping address.
Shipping charge is taxable.
Group discount is 15% of the product sub-total.
Tax rate is 6.75% (for this order; rate varies by county).
Sub-total (product) plus shipping less discount is $13.39.
Tax amount should be .90.
The amount shown, .84, is actually 6.27% of $13.39.
If the sub-total plus shipping less discount had been $12.44, then .84 tax would have been correct.
Same error occurs in both 1.3.7 and 1.3.8a.

23 Mar 2008, 2:31 AM
#6
rebelwax avatar

rebelwax

New Zenner

Join Date:
Nov 2006
Location:
Toronto, Ontario
Posts:
63
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Sounds like what is happening in my 1.3.8a store too. Funny thing is...it works fine on my current 1.3.7 store. Has anyone figured this one out yet?

15 Apr 2008, 10:41 AM
#7
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Rebelwax:

Sounds like what is happening in my 1.3.8a store too. Funny thing is...it works fine on my current 1.3.7 store. Has anyone figured this one out yet?

I realised this happening in our 1.3.8a too:

Without VAT tax: 31.89EUR
With VAT: 38.90EUR
Store pick up: 0.00EUR
Group discount:-13.77EUR
VAT 22%: 4.91EUR
Total: 25.13EUR

VAT: 4,91106

Total should be 27,23 euro with discount of 30%.

18 Apr 2008, 9:25 PM
#8
tzeyangng avatar

tzeyangng

New Zenner

Join Date:
Dec 2007
Posts:
35
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

i had exactly the same problem. Anyone found any solution on this?

21 Apr 2008, 3:12 PM
#9
tzeyangng avatar

tzeyangng

New Zenner

Join Date:
Dec 2007
Posts:
35
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

anyone please help? This issue has been bugging me for few days. and my store is up and running now. please help.

2 Jun 2008, 8:21 PM
#10
heidikfi avatar

heidikfi

New Zenner

Join Date:
Mar 2005
Location:
Finland
Posts:
64
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Same problem here. My 1.3.8a shop is up and running, and the tax calculation is wrong when discounts are used.

Goods and postage are taxable goods, VAT 22 %, as required by our officials. The costs are fed into ZC without tax. Tax is set to show everywhere. Here only B-to-B prices are shown at 0 % VAT, for consumers the totals have to be shown.

When a discount is applied, the VAT is undercharged. It should be 18.03 % calculated from the gross, but it varies around 17.5 %. I can't give those invoices to my bookkeeper, but have to rewrite them!

:frusty:

4 Jun 2008, 9:47 AM
#11
rlparker avatar

rlparker

New Zenner

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

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

I have several different discounts running on my cart including quantity discounts and group discount

my tax is being calculated on the subtotal BEFORE any of the discounts and I need it to apply the discounts before calculating the tax

does any one have any ideas how I can do this or where the code is that calculates the tax?

thanks

Rachael

4 Jun 2008, 11:30 AM
#12
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,691
Plugin Contributions:
56

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Using recalculate tax reduces the amount of tax based on the size of the discount. But the initial figure is based on the subtotal before discounts.

Be sure to get recent copies of Quantity Discounts and Group Discounts (the latter may involve upgrading your cart) - the tax logic has been refined over time.

4 Jun 2008, 11:48 AM
#13
rlparker avatar

rlparker

New Zenner

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

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

sorry this is probably a daft question but what/where is recalculate tax?

thanks

1 Jul 2008, 2:47 PM
#14
rlparker avatar

rlparker

New Zenner

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

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

if I set the discounts to recalulate the tax I am getting some very odd results.

Does anyone know what bit of code I need to edit to calculate the tax after the discount has bee subtracted?

thanks

Rachael :dontgetit

6 Jul 2008, 4:22 PM
#15
psychicpet avatar

psychicpet

Inactive

Join Date:
Sep 2007
Posts:
44
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

I am running 1.3.7 and am also having this problem...and on larger orders the discrepancy can be sizable.

Here is a sample order at 8.25% tax before application of a 10% coupon:

Sub-Total: $189.00
Shipping: $0.00

CA State Sales Tax: $15.59

Total: $204.59

The tax is calculated accurately. Now apply a 10% discount:

Sub-Total: $189.00
Shipping: $0.00
Discount Coupon: pc0108a10 : -$18.90

CA State Sales Tax: $12.47

Total: $182.57

The correct tax on a subtotal of $170.10 should be $14.03 but as you can see, the cart is calculating $12.47. I have had orders where I have lost as much as $6 in tax on an order.

Any ideas or fixes for this??

Robert

23 Jul 2008, 7:02 PM
#16
nosnappyname avatar

nosnappyname

New Zenner

Join Date:
May 2008
Posts:
18
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

Running Zen Cart 1.3.8a, Database Patch Level: 1.3.8

Similar problems to many here . Settings are :
Sort Order 190
(after sub total and before shipping)

Include Shipping false

Include Tax false

Re-calculate Tax Standard

Tax Class --none--

Error #1: Taxes on shipping are discounted even though Shipping costs themselves are not discounted. I do not want to discount shipping.

Error #2: The final total does not match the totals of items calculated after group discount is applied even after ignoring the error above. This is caused by a rounding error introduced through the method of proportional recalculation of the total instead of adding up the totals again.

Lastly, while it doesnt happen in my case due to a lucky choice of tax rate, the proportional method is at risk of causing rounding errors in the tax calculations too, eg
Original price = $5.00, tax excluded, group discount 10%, tax 7%.

  1. (5.00-0.50)*.07=4.50 *.07 (7%) = .315 rounded up to .32 (the right answer)

  2. 5.00 .07 = .35 (original tax)
    tax difference due to discount=.50
    .07=.035 rounded up to .04
    difference=.35-.04=.31 (the proportional answer)

So, when the rewrite takes place i hope these considerations can be taken into account.

22 Jan 2010, 12:41 AM
#17
kavlito avatar

kavlito

New Zenner

Join Date:
Sep 2009
Posts:
40
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

After implementing Group Pricing, my tax was incorrectly calculating based on Sub-Total. I edited the Group Discount in the Order Totals Module and set Re-calculate Tax to Standard and now the tax is calculated correctly after the Group Discount is applied.:clap:

12 Mar 2010, 12:38 PM
#18
leijonberg avatar

leijonberg

New Zenner

Join Date:
Mar 2010
Posts:
1
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

I have a similar problem. Tax calculation is correct, even when coupons or group pricing are used. The discount displayed and the total is wrong though.

On an order value of 1995,00 (1596,00 excl. VAT), I get 224,00 discount with 10% setting (where I should get 199,50). Shipping is 118,00 (94,40 excl. VAT) and the VAT is 25%, so I get:

((1596 - 10%) + 94,4) * 0,25 = 382,7 (VAT)

This is calculated correctly (rounded to 383,00).
Order total should thus be 1913,50, but I get 1850,00 in order total.

This means that the discount I really got in the total is:

1995 + 118 - 1850 = 263,00

and not the 224,00 displayed, or the 199,50 as it should be.

Could someone please help me? Where do I look for a solution?

12 Mar 2010, 5:37 PM
#19
coredesign avatar

coredesign

New Zenner

Join Date:
Mar 2005
Location:
Toronto Canada
Posts:
14
Plugin Contributions:
0

Re: [fixed 1.3.9a] Group Discount and Discount Coupon Tax Calculation Issue

After some fiddling around, my cart's handling of the order total, discount and tax on net order amount are working properly.

HOWEVER, I am now seeing an issue with the shipping tax calculation! The shipping amount shown on the Checkout page is correct, but the tax on shipping is being calculated on the shipping cost minus the discount coupon percentage.

Please see the attached PDF for the numbers I'm looking at.

ot_coupon
Include Shipping: false
Include Tax: false
Recalculate Tax: Standard

Display Prices with Tax: false