Forums / Bug Reports / [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

[Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Locked

Started by argyle on 24 Apr 2010, 4:22 AM · Views: 5,136

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
24 Apr 2010, 4:22 AM
#1
argyle avatar

argyle

New Zenner

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

[Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Upgraded to 1.3.9a.

When a costumer places his/her order the tax name wont show up...Will just say how much tax it is but nothing more...

I got the tax class GST...Before it always said.

Sub-Total: $36.00
Zone Rates (Shipping to AU): $25.00
GST: $0.00

Now it looks like this after the update...Should say GST

Sub-Total: $36.00
Zone Rates (Shipping to AU): $25.00
: $0.00

Any ideas? everything else works fine... I don't charge any sales tax but i have to display it...

Cheers
Robin

24 Apr 2010, 4:39 AM
#2
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Argyle:

Any ideas? everything else works fine... I don't charge any sales tax but i have to display it...

Unless someone beats me too it I'll try to take a closer look at this later today.

Meanwhile, assuming you are referring to Australian GST you DO NOT have to display the tax amounts (zero or otherwise) - The exception being is if you are registered for GST and provide a TAX INVOICE that contains one or more GST exempt items.

If you provide a TAX INVOICE with no tax amounts specified then all items on the invoice are assumed to be taxed at 10%

If you are not registered for GST then you cannot provide a TAX INVOICE, nor can you charge GST - You simply provide your customer with a SALES INVOICE which implies no GST was charged.

My advice to you is if you aren't registered for GST (and there is no need, and no good reason to do so unless your annual turnover is >$75k) then simply ignore/disable anything to do with tax, and ensure you provide your customers with a sales invoice rather than a tax invoice. (The only diiference between a sales invoice and a tax invoice is:

  1. A tax invoice must clearly identify itself as a "tax invoice"
  2. A tax invoice must include your ABN

Anything else is simply a sales invoice.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

24 Apr 2010, 4:57 AM
#3
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

I'm from New Zealand....

I'm not registered for GST since my annual turnover is not above 60 000dollars...

But i'm pretty sure I have to display and tell if i don't charge GST here, everybody else does that...

Cheers
Robin

24 Apr 2010, 6:03 AM
#4
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Argyle:

I'm from New Zealand....

Don't worry, I won't hold that against you :D

Argyle:

I'm not registered for GST since my annual turnover is not above 60 000dollars...

But i'm pretty sure I have to display and tell if i don't charge GST here, everybody else does that...

Cheers
Robin

It doesn't surprise me that NZ rules and AU are different. I had assumed you were Australian - We don't seem to see to many kiwis around here.

Sorry, I haven't had a chance to check out your display problem yet (I got side tracked on a more pressing matter).

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

24 Apr 2010, 6:08 AM
#5
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Well the real truth is that I'm from Sweden, but immigrated to NZ a couple of years ago...

Might have been a genuine fault also, i made a mock order with my swedish credit card... I don't know if that made it play up a bit, but if you can check if you get the same problem i would appreciate it!

cheers mate

Robin

24 Apr 2010, 6:53 AM
#6
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

24 Apr 2010, 10:04 AM
#7
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Argyle:

the page is www.pbmarkers.co.nz

Quick note to confirm that this appears to be a bug. I am getting the same results on my test system.. I need to do a bit more digging to see if I can isolate the cause.

Time for a teabreak, more info later this evening.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

24 Apr 2010, 10:43 AM
#8
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Will keep myself updated to see what you've come up with, can't be a big problem..

24 Apr 2010, 3:01 PM
#9
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Argyle:

Will keep myself updated to see what you've come up with, can't be a big problem..

How come non programmers always think that something like this "can't be a big problem"?

Sure, it isn't going to be a big problem AFTER the fix has been found, but finding it can take hours .... days .....

Needless to say, I've been looking at this for several hours now and still haven't found the cause/cure (However, if you are desperate I can offer you several 'work-arounds' to the problem).

Anyway, I need to call it quits for the night and probably won't have much time to spend on it tomorrow, I hoping that one of the core devs (Dr.Byte, Ajeh, etc) will pick up this thread and possibly offer some insights, so what follows is mostly for their benefit.


**Zencart V1.3.9a **
Problem: Tax rate description(s) not being displayed if tax is zero. (during checkout)

Description: With **Sales Tax Display Status **set to '0' the entire item line is correctly removed from the output when tax == 0

With **Sales Tax Display Status **set to '1' the tax item line will correctly display $0.00 (when appropriate) but tax description outputs a NULL if the Show Split Tax Lines == false, and a '0' if Show Split Tax Lines == true

It may be a coincidence, but my fresh installation of 1.3.9 doesn't appear to have this problem, it is only happens with the site(s) I've upgraded, and assumedly the OP also performed an upgrade.

**Debugging performed **
I've spent most of my time working with the /modules/order_total/ot_tax.php file (seemed like a logical place to start) and have eliminated this file as being the cause of the issue.

The problem appears to originate further back in the depths of the code, specifically, wherever it is that processes the data that populates the $order->info['tax_groups'] array.

It appears that if tax == 0 this array is populated with : Array ( [0] => 0 ) rather than Array ( [tax_description] => 0 )


As Argyle says, I'm sure its not going to be a big problem, especially now that I've told you what to look for <big grin>

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

25 Apr 2010, 5:04 AM
#10
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Sad you could not find it, I will just have to write GST with a pen until someone's found the problem. Must be a tricky one to find I guess, heaps of code to go trough!

I've done a upgrade and not a fresh install.

25 Apr 2010, 8:06 AM
#11
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Argyle:

Sad you could not find it, I will just have to write GST with a pen until someone's found the problem. Must be a tricky one to find I guess, heaps of code to go trough!

I've done a upgrade and not a fresh install.

Try this:
Set your GST tax rate to 0% (zero)

Go to the admin section of whatever shipping module you are using, and set the the shipping to be a taxable item (@ zero percent).

If the tax description still doesn't show, go to /admin/configure/mystore and ensure that
Sales Tax Display Status = 1
Show Split Tax Lines = true

That should give the desired results.

An alternative would be to make all of your products taxable at 0%.

Simply put, for zencart to output a tax description it requires something in the cart to be taxable (tax on shipping is acceptable), otherwise it is 'correctly' outputting a zero value with an undefined description.

I'm figuring that it was the old version that technically had the bug in that it could/would output a tax description even though no taxable items were in the cart. The change of code that allows different taxes to be itemised
(the "Show Split Tax Lines"setting ) has eliminated the 'bug' that you have been lucky enough to have taken advantage of in the past (without realising it).

In summary, I probably wouldn't be expecting the devs to 'fix' the code to revert back to the old incorrect behaviour, especially since your case is almost certainly the exception to the normal rules (However, I could be wrong on both counts).

Personally I see no need to investigate this matter further, especially if you can verify/confirm that the suggestions I've made will solve the problem described, which, incidently is probably the best way to include/add a tax charge of 0% anyway (as opposed to adding no tax and then hoping the code can figure out what the zero charge is actually for).

Hopefully this makes sense (I often tend to over explain things)

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

26 Apr 2010, 11:20 AM
#12
argyle avatar

argyle

New Zenner

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

cheers will test it!

28 Apr 2010, 1:38 PM
#13
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Hi,

Yesterday I made an attempt at upgrading from 1.3.8a to 1.3.9a on localhost.

I noticed the same bug yesterday when I was testing all of it and thought that it was because of the customer tax exempt module that was installed.

Reading this now, I have the same problem on my cart. If the tax is 0% or if customer is exempt from it, the description "sales tax" is gone and all they will see is "0.0%". However if tax is levied on the product, the description correctly appears with the tax rate.

28 Apr 2010, 3:56 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Did you try the suggestion above? ie: set your shipping module to be taxable at 0%

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Apr 2010, 4:59 PM
#15
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

I maybe doing something wrong. Here is how I have tested it and results:

Original setting
Tax Class - Taxable Goods
Tax Rate - Texas Sales Tax 8% (Defined as shipping to zone TX)
Shipping Module - UPS Tax Class = Taxable Goods
Sales Tax display status - 1 (display even when 0)
Split Tax - off

When above is used, if tax is levied, it correctly shows Texas Sales Tax $xx.xx. If the customer is tax exempt or shipping outside of Texas the description disappears and it only shows 0.00.

New setting
Tax Class-Taxable Goods
Tax Rate- Texas Sales Tax 8 %
New Tax Rate - Sales Tax 0%
Shipping Module - UPS Tax Class = Taxable Goods
Sales Tax display status - 1 (display even when 0)
Split Tax - off

When customer is tax exempt it now has the description but it shows "Sales Tax + Texas Sales Tax = 0.00" which I think is confusing.

Please advise if I have the settings wrong somehow?

29 Apr 2010, 7:01 AM
#16
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Decostyle:

New setting
Tax Class-Taxable Goods
Tax Rate- Texas Sales Tax 8 %
New Tax Rate - Sales Tax 0%
Shipping Module - UPS Tax Class = Taxable Goods
Sales Tax display status - 1 (display even when 0)
Split Tax - off

When customer is tax exempt it now has the description but it shows "Sales Tax + Texas Sales Tax = 0.00" which I think is confusing.

Please advise if I have the settings wrong somehow?

Your situation is a liitle different than the original OP's on account of the fact that all tax needed to be zero, and the zero tax was alsways going to be "GST". The following approach may be more suitable in your situation:

Tax Class-Taxable Goods
Tax Rate- Texas Sales Tax 8 %
New Tax Rate - Shipping Tax 0% (or valid %)
Shipping Module - UPS Tax Class = Taxable Goods (shipping tax)
Sales Tax display status - 1 (display even when 0)
Split Tax - on

If I'm not mistaken, this should output something like

Texas Sales Tax = $xx.xx (may be zero, if exempt)
Shipping Tax = $xx.xx or $0.00 depending on rate)

Also, do keep in mind that most of the time there is no need to output a zero tax amount anyway, and in my opinion this is the 'best and cleanest' solution to the problem, and if an output of zero is needed, does it really matter what type of tax it is that doesn't attract a fee?

I mean, seriously, it could be possible for you to introduce tax rates such as a "Friday Delivery Tax" - and it would make perfect sense to output something like " Friday Delivery Tax = $5.00", when applicable, but you certainly wouldn't want to output " Friday Delivery Tax = $0.00" for purchases made on any other day of the week.

I really don't think your customers are going to complain about a zero charge regardless of whether it has a 'label' or not. The IMPORTANT thing is that when there IS a tax fee then zencart WILL output the description that it relates too.

Anyway, hopefully this suggestion helps solve you problem - if not, the devs may need to go back to the drawing board and possibly output a simple "TAX = $0.00" for those times where the description of a zero value is either indeterminate or consists of multple tax classes each with a zero value (leading to the sample output that you provided).

Good luck,

Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

29 Apr 2010, 12:35 PM
#17
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Hi Rod,

Appreciate your time looking into this. I thought about this yesterday and came to the same conclusion you did that it would be better off just disabling display of tax if value is 0% to avoid confusion. This works if the website is just for retail business.

However we do have another one which does business for retail and wholesale. Resellers are tax exempt if they show us their resale certificate. So for purposes of record we need to show an invoice that says Texas Sales Tax= 0% even if ship address is within Texas.

Having said that. These are the results of the settings as you outlined:

**SETTING **
Tax Class-Taxable Goods
Tax Rate- Texas Sales Tax 8 %
New Tax Rate - Shipping Tax 0% (or valid %)
Shipping Module - UPS Tax Class = Taxable Goods (shipping tax)
Sales Tax display status - 1 (display even when 0)
Split Tax - on

RESULT CUSTOMER IS TAX EXEMPT:
Sales Tax = 0.00% (Texas Sales Tax =0.00% does not appear)

RESULT CUSTOMER IS TAXED:
United Parcel Service (1 x 1.25lbs) (Ground): $12.81
Sales Tax: 0.00% <--this is the 0.00% tax
Texas Sales Tax (8%): $1.38 <--tax for the item
Sales Tax + Texas Sales Tax (8%): $1.02 <--tax on shipping

This may not work as it would cause some confusion I think.

I will check to see if this occurs on a fresh install of zencart with the tax exempt module installed.

29 Apr 2010, 3:59 PM
#18
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Fresh install of zencart 1.3.9a, with tax exempt module has the same problem. When tax is exempt or 0 and tax status is set to display even if 0 the description disappears and ":$0.00" is what shows up.

Let's say we take out the tax exempt module and run the store normally even if it is a wholesale site and therefore will have customers who are tax exempt.

If customers are not immediately charged, we can just leave the tax info there and edit it out upon shipment. However, if payment is processed through a gateway and it is immediately charged, we will have to end up refunding the customer every time.

Is this something that can be fixed rather easily or is this a major fix that needs to wait until the next zencart version?

Just wondering because 2 of our sites are wholesale sites.

30 Apr 2010, 4:07 AM
#19
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Decostyle:

Having said that. These are the results of the settings as you outlined:
<snip>
This may not work as it would cause some confusion I think.

I'm inclined to agree. I'm sure these results may give the devs a better idea how to tackle the problem though. As for me, I'm currenlty a bit 'brain dead' (having spent the last 4 days in bed with a fever)... Scary thing is, I don't even remember posting that message with my suggestions to you.

Decostyle:

I will check to see if this occurs on a fresh install of zencart with the tax exempt module installed.

My initial checks into this problem did suggest that it only occurred with a 1.3.9 upgrade rather than a fresh install, but subsequent testing and checking indicated that this wasn't the case, It had more to do with the tax status of the items in the carts I was testing with.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

30 Apr 2010, 4:22 AM
#20
rodg avatar

rodg

Deceased

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

Re: [Done v1.3.9b] Tax name wont show up on order if tax is 0.00

Decostyle:

Fresh install of zencart 1.3.9a, with tax exempt module has the same problem.

Hey, I just finished typing pretty much the same thing to you. (Our postings must've crossed paths in the ether).

Decostyle:

Is this something that can be fixed rather easily or is this a major fix that needs to wait until the next zencart version?

This is something for the Devs to look into and respond.

Although it may seem like I have some idea what's going on, the truth is, this is an area of code that I'm really not familiar with, and if the person that originally reported this problem had anything more complex than they described I probably wouldn't have even gotten myself this far involved.

So, sorry I can't be more helpful, but I reckon that between us we have given the Devs a lot of good/useful information that will help them produce a solution without having to do a lot of this 'preliminary' fault finding groundwork.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.