Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Bizarre Tax calculation

Bizarre Tax calculation

Views: 5,115

Results 1 to 20 of 30
1 Jul 2014, 3:03 AM
#1
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Bizarre Tax calculation

Hi, Zeners, I'm a complete newb and have been scouring for answers but don't seem to find what's happening in my store.

The store is in Australia, with a single currency and uses flat rate shipping. Tax is flat rate across the board at 10% on products, services and shipping.

If I purchase an item at $999, $10 is added for shipping and the tax is calculated correctly at $91.73

If I use a $10 discount coupon (value set at 10 in coupon admin) we have..

Purchase $999
Freight $10
Discount $10.91
Tax $90.82 (correct amount should be $90.74)

OK - I see that the discount coupon has appears to have been taken as a tax free amount, so I go back to coupon admin and set the coupon value as $9.09

Here's what happens...

Purchase $999
Freight $10
Discount $9.92
Tax $90.90 (correct amount should be $90.83)

Store settings are

Display prices with tax
Display prices with tax in Admin

and in Order Total / Discount Coupon - Include shipping True, Recalculate Tax Standard, Tax Class - Taxable Goods (which is set at 10%)

Can anybody please explain to me what's happening here, or nudge me in the right direction to find a solution?

Thanks in Advance...

1 Jul 2014, 3:12 AM
#2
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

PS - Version is 1.51

Thanks

1 Jul 2014, 3:21 AM
#3
hfxracing avatar

hfxracing

New Zenner

Join Date:
May 2011
Location:
Nova Scotia
Posts:
39
Plugin Contributions:
0

Re: Bizarre Tax calculation

I would check your Shipping/Packaging setting
make sure that the tier is 0:0 or else the cart will add the tier percentage. That could be it Was throwing my prices off at the start. just to be sure.

1 Jul 2014, 4:06 AM
#4
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

Thanks for the tip. Indeed they were set inappropriately (because I didn't know what they were). But even set to 0:0 the discount amount and tax amounts remain the same - bizarre!

1 Jul 2014, 9:12 AM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

satphone:

Tax is flat rate across the board at 10% on products, services and shipping..

I assume that you don't sell to customers outside of Australia? If you do, you are breaking the law.
I also assume that you are registered to collect GST? If not, you are breaking the law.

satphone:

OK - I see that the discount coupon has appears to have been taken as a tax free amount, so I go back to coupon admin and set the coupon value as $9.09

According to the ATO, Gift vouchers are considered the same as cash. They are GST free. If you apply GST to them you are breaking the law.

satphone:

Here's what happens...

Purchase $999
Freight $10
Discount $9.92
Tax $90.90 (correct amount should be $90.83)

Here's what should happen.

Purchase $999
Freight $10
Tax $91.73 (included in the total price of $1009)
Discount $10.00
Amount Due: $999.00

To get these results you may need to change the sort order of the order_total settings.

Cheers
RodG

1 Jul 2014, 9:22 AM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

Optionally

Purchase $908.18
Postage $9.09
GST $91.73
Total $1009
Discount $10
Amount Due $999.00

This is acceptable on the invoice, but your webpages MUST show GST inclusive prices.

Cheers
RodG

1 Jul 2014, 9:23 AM
#7
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

I have no idea what "breaking the law" has to do with my question.

I have never mentioned gift certificates, and am not really interested in them.

Can we please keep this on topic?

If you think the "sort order" is causing these bizarre calculations, can you please let me know what I should be checking? Remember I am a Newbie so it I may need quite a bit of concise information rather than a vague direction.

Your description of what "should" happen is what I want to happen. I just don't seem to find Zen Cart doing this.

Thank you.

1 Jul 2014, 9:25 AM
#8
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

RodG:

Optionally

Purchase $908.18
Postage $9.09
GST $91.73
Total $1009
Discount $10
Amount Due $999.00

This is acceptable on the invoice, but your webpages MUST show GST inclusive prices.

Cheers
RodG

My site shows only inclusive of GST prices. I'm sorry I didn't make that clear.

Can you help with the bizarre calculations?

1 Jul 2014, 9:32 AM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

satphone:

I have no idea what "breaking the law" has to do with my question..

It means that I'm trying to keep you out of trouble. Is that so wrong of me?

satphone:

I have never mentioned gift certificates, and am not really interested in them.
.

Gift Vouchers, Discount Coupons, Cash Discounts or adjustments are all considered the same thing by the ATO. There should be no GST component involved in anyway whatsoever.

satphone:

Can we please keep this on topic?

I though it WAS on topic.

satphone:

If you think the "sort order" is causing these bizarre calculations, can you please let me know what I should be checking?

The sort order determines how and when the various calculations are applied. If you weren't so keen to criticise my input you probably would have have picked up on this from the examples I gave.

satphone:

Remember I am a Newbie so it I may need quite a bit of concise information rather than a vague direction.
Your description of what "should" happen is what I want to happen. I just don't seem to find Zen Cart doing this.

I've tried to help, but got lambasted. Give me one good reason why I should waste more time with you?

RodG

1 Jul 2014, 10:30 AM
#10
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

That's OK. I never felt I was in trouble. Thank you for being considerate.

I'm not new to business, or my obligations in Australian taxation law.

I am new to Zen Cart.

I'm just trying to find out why the store doesn't calculate discounts and GST correctly. Can you help?

ie. tax on $999 (tax inc.) + $10 (tax inc.) freight - $10 inc. discount - should equal $90.82

Pretty simple - tax payable is 1/11 of the amount of goods and services inc. tax (or 10% of the amount prior to tax.)

As mentioned, this is not what happens

Any help from the forum much appreciated.

1 Jul 2014, 12:38 PM
#11
hfxracing avatar

hfxracing

New Zenner

Join Date:
May 2011
Location:
Nova Scotia
Posts:
39
Plugin Contributions:
0

Re: Bizarre Tax calculation

satphone:

ie. tax on $999 (tax inc.) + $10 (tax inc.) freight - $10 inc. discount - should equal $90.82

I think what he is trying to to tell you is that the shopping cart & to be correct by law should calculate as follows:
Price
Shipping
TAX (you must show customer you have tax in there)
Total
Discount

If you put the discount anywhere before you charge tax you would be applying it to the discount. When it should only be applied after tax.
I think that is what RodG is trying to tell you. I could be wrong.

1 Jul 2014, 4:47 PM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

satphone:

I am new to Zen Cart.
I'm just trying to find out why the store doesn't calculate discounts and GST correctly. Can you help?

Yes.

satphone:

Pretty simple - tax payable is 1/11 of the amount of goods and services inc. tax (or 10% of the amount prior to tax.)

No need to be condescending.

I'll probably regret this, but..... since the last thing I'd want to do is scare people away from the most versatile eCommerce system available..

module Sort order


ot_subtotal 100
ot_shipping 200
ot_tax 300
ot_xxxxxxx 400-900 (discounts, gift vouchers, low order fees, coupons, etc
ot_Total 999

1 Jul 2014, 7:04 PM
#13
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,795
Plugin Contributions:
22

Re: Bizarre Tax calculation

I'm not an Aussie so I won't go into legal matters because I don't know your laws (Rod is definitely more competent on that matter), but there is something I don't understand...

Why would the discount be calculated AFTER tax? I'm assuming we're talking about discount coupons, not vouchers. I prefer to compare that discount to a specials price (sale). Product is discounted and customer is paying less. Why do you need to pay tax on full price?
Let's say I setup a discount coupon to 50%. Product was $500, now is $250. I'm charging the customer $250. Shouldn't tax be $22.73 and net $227.27? If we calculate tax before discount, won't it be $45.45? (Besides, that's how Zen Cart is configured out of the box: calculate discount before tax).
Same thing here: product is $999 - $10 discount + $10 shipping --> total is $999 and tax should be $90.82

I agree that the calculations are totally weird - I remember I had the same problem 5-6 years ago with my own shop and had to rewrite the ot_coupon file to use my calculations. Maybe that was stupid and there's a better way to do it from the admin, but I couldn't figure it out and my bookkeeper never complained...
Unfortunately, I have no idea what I did back then (it was probably some redneck method :D ) - I'll check my archives later today to see if I can find the file (although I honestly doubt it, it's been almost 5 years since I shut that site down...).

2 Jul 2014, 5:49 AM
#14
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

I made the sort order change but there was more to it than that.

Now it's calculating the GST on the PRE discounted some, applying that and then applying the discount. This seems a very strange thing indeed. eg.

$100 sale, no discount = tax of $9.09
$100 sale with $50 discount = = tax of $9.09

In Australia GST is payable on the FINAL sale value.

2 Jul 2014, 8:36 AM
#15
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

satphone:

I made the sort order change but there was more to it than that.

Now it's calculating the GST on the PRE discounted some, applying that and then applying the discount.

Isn't that what you wanted?

No? In that case, you need to re-order things once again.

module Sort order
-------------- ------------
ot_subtotal 100
ot_shipping 200
ot_xxxxxxx 300-800 (discounts, gift vouchers, low order fees, coupons, etc )
ot_tax 900
ot_Total 999
------------------------

For the ot_coupon module (which I'm assuming is what you are using for discounts) you need

**Include Shipping
false

**Include Tax
true

**Re-calculate Tax
None

**Tax Class
GST Taxable Goods

********I'm pretty sure those settings will give the results you desire, but for reasons I can't explain, my notes for the ot_gv module hav slightly different settings.

**Include Shipping
true

**Include Tax
true

**Re-calculate Tax
None

**Tax Class
--none--

**Credit including Tax
false


********The common factor being that in both cases, Include Tax = true, and Re-calculate tax= None. (I suspect that the Tax Class setting is being ignored since the tax isn't being re-calculated).

Rgds
RodG

6 Jul 2014, 11:32 PM
#16
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

Thanks for the tips. Still getting strange results with your suggestions.

What's needed is...

Order Value + freight Value - discount = Total, with GST being calculated as, and shown as 1/11 of Total.

At the moment the closest I can get to work is ..

Order Value + freight Value - discount = Total, with GST being calculated as, and shown as 1/11 of (Order Value + Freight)

No permutation of sort order and settings gets it right.

Without the ability to correctly process discount coupons makes the coupon module seriously broken. I'm dreading the thought of migrating, but if this is the case I'll be forced into migrating to something up to date.

Cheers,

Kev

7 Jul 2014, 2:55 PM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Bizarre Tax calculation

satphone:

Thanks for the tips. Still getting strange results with your suggestions.

No permutation of sort order and settings gets it right.

Hmmm, not sure what to make of this. I've just checked on a clients site

ot_coupon settings

Discount Coupon
This module is installed true Sort Order 280 Include Shipping false Include Tax false Re-calculate Tax Credit Note Tax Class GST Taxable Goods

Important: This settings are different than the ones I posted previously. The 1st examples were taken from my notes (a couple of years old). The settings above were taken from a 'live' site running V1.5.2BETA RC2). Time to update my notes I reckon. ;-)


Sub-Total: $49.95
(Parcel under 500g): $7.20
Discount Coupon: TEST : -$10.00
Total: $47.15
(incl) GST: $4.29

7 Jul 2014, 4:16 PM
#18
swguy avatar

swguy

Administrator

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

Re: Bizarre Tax calculation

satphone:

What's needed is...

Order Value + freight Value - discount = Total, with GST being calculated as, and shown as 1/11 of Total.

You have to write code to get this.

7 Jul 2014, 8:44 PM
#19
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

Rod - I'll check that out.

Need to write code? Any idea what, why, where? Is it a major job?

Surely getting coupons to work correctly is a pretty basic requirement???

7 Jul 2014, 9:12 PM
#20
satphone avatar

satphone

New Zenner

Join Date:
Jun 2014
Location:
Australia
Posts:
60
Plugin Contributions:
0

Re: Bizarre Tax calculation

Rod - here's what I've got

ot_coupon 280
Shipping ot_shipping 200
Sub-Total ot_subtotal 100
Tax ot_tax 300
Total ot_total 999

Include Shipping
false

Include Tax
false

Re-calculate Tax
Credit Note

Tax Class
Taxable Goods

Now here's what it calculates

Sub-Total: $95
Flat Rate (Best Way): $10.00
Discount Coupon: 10 : -$10.00
GST 10%: $8.55
TOTAL: $95.00

Whilst the Total is correct the GST is just whacky. It should be $95/11 = $8.64

So it seems the cart is calculating the discount amount as $10.91 and deducting that. This makes the calculated GST correct IF the coupon was $10.91

If I try to set tax = true I get the warning

Setting Include tax = true, should only happen when recalculate = None

If I go and set the discount to a $9.09 (10 - 10/11)

I get the correct GST, but the order Total is wrong

Flat Rate (Best Way): $10.00
Discount Coupon: 10 : -$9.09
GST 10%: $8.64
TOTAL: $95.91

I can have the Total correct OR the GST correct, But not both, which makes the module extremely broken and unusable.

Cart Version is 1.5.1