Forums / Currencies & Sales Taxes, VAT, GST, etc. / Sales Tax incorrect with percentage discount coupon

Sales Tax incorrect with percentage discount coupon

Locked

Views: 5,608

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
10 Nov 2009, 11:45 PM
#1
coryinit avatar

coryinit

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Sales Tax incorrect with percentage discount coupon

V1.3.8a

I'm having an issue with a 25% discount coupon. When I use it on the order of one item, the tax is calculated incorrectly. For example

Sub-Total: 11.00
United Parcel Service (Ground): $6.88
Discount Coupon: Patriot : -$2.75
NE TAX 5.5%: $0.74
Total: $15.87

The tax should actually be $.83 since we tax shipping in the state:
11.00 + 6.88 - 2.75 = 15.13
15.13 * .055 = 0.83215

The ot_coupon module is configured as follows:
<><><><><><><
This module is installed
true
Sort Order
280
Include Shipping
false
Include Tax
false
Re-calculate Tax
Standard
Tax Class
--none--
<><><><><><><

Any help would be appreciated. I've read much related to miscalculation of VAT taxes, but all of those issues seemed related to quantity discounts and coupons.

Thanks.

11 Dec 2009, 5:59 PM
#2
sgt_slaughter avatar

sgt_slaughter

New Zenner

Join Date:
Aug 2009
Posts:
18
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

I'm having the exact same issue with a 15% coupon. I have the same settings in the coupon admin, just a different tax rate where I am.

Were you able to resolve this issue?

Thanks,

11 Dec 2009, 6:09 PM
#3
sgt_slaughter avatar

sgt_slaughter

New Zenner

Join Date:
Aug 2009
Posts:
18
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

I determined what the issue is, just don't know how to fix it.

The Discount Coupon when it recalculates the Tax it does the following:

Tax = (Subtotal - %15) * Tax Rate + (Shipping - %15) * Tax Rate

Even though we have "Include Shipping" = False in the config.

The Shipping is not included in the Discount Coupon amount though, so it half works, just not perfect...

Any solutions would be a great help.

Thanks!

11 Dec 2009, 6:29 PM
#4
sgt_slaughter avatar

sgt_slaughter

New Zenner

Join Date:
Aug 2009
Posts:
18
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

In looking at this further It appears the issue is in file:
/includes/modules/order_total/ot_coupon.php

Lines 65-70:
while (list($key, $value) = each($order->info['tax_groups'])) {
if ($od_amount['tax_groups'][$key]) {
$order->info['tax_groups'][$key] -= $od_amount['tax_groups'][$key];
$tax += $od_amount['tax_groups'][$key];
}
}

How do I add an If statement to check if $this->include_shipping is false and the $key,$value is the class "ot_shipping" and ignore it for tax purposes?

Potentially I'm not looking in the right place, but I should be close...

13 Dec 2009, 1:46 PM
#5
largomike1 avatar

largomike1

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

I had the same problem. I can't believe it, but I figured it out by chance! :clap: Try this out, and see if it works for you.

1- Create a coupon code (if you don't have one already).
2- In your Admin area go to Modules->Order Total
3- Choose Discount Coupon Module
4- Click Edit and set the Recalculate Tax option to Standard.

That's what worked for me. I tested an order and it calculated the tax correctly. Let me know if it works for you.

You're welcome to try it out on my site at - pursebling.com. I setup a coupon code you can use: zencarters It's good for 10% off. We only charge tax for the state of Florida. So if you're trying to test this out on my site, you'll have to create a shipping address with Florida as the state.

Hope this helps!

6 Jan 2010, 2:46 PM
#6
gg01 avatar

gg01

New Zenner

Join Date:
Jul 2008
Location:
Ontario, Canada
Posts:
85
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

This doesn't work for me. Has anyone found a solution to this problem??

6 Jan 2010, 6:07 PM
#7
sgt_slaughter avatar

sgt_slaughter

New Zenner

Join Date:
Aug 2009
Posts:
18
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

Still haven't found a solution myself...

3 Feb 2010, 10:43 PM
#8
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

I was experiencing a similar problem with a flat rate coupon for one of my client's sites. It was coming up short on sales tax and the final total would be a little short in turn. We had both sales tax and shipping based tax enabled on this site.

After I modified the settings for OT_Coupon to Include Tax: true, recalculate tax to none, and selected Taxable Goods as my zone, the calculation of the total started coming out correct.


Shortly after I posted this, I realized it might not be a great solution. The way this is working is it calculates the entire total with tax and THEN deducts the coupon amount. I don't think Mr. IRS will like that much, since it will make the tax amount incorrect.

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

5 Apr 2010, 2:40 AM
#9
gg01 avatar

gg01

New Zenner

Join Date:
Jul 2008
Location:
Ontario, Canada
Posts:
85
Plugin Contributions:
0

Re: Sales Tax incorrect with percentage discount coupon

The only way I can get a discount to work properly (in terms of tax calculations with shipping) is to change my coupon from a percent to a dollar amount.

I also had to change the setting in the order total module under discount coupon to include shipping to true. It doesn't take any additional discounts off of the shipping and seems to calculate the tax correctly.

Hope this helps until the percent issue is resolved...