Re: Tax name wont show up on order if tax is 0.00
Another update to give the DEVS more info:
Fresh install of 1.3.9a
No tax exempt module installed.
Tax set to display even when 0
Result:
No description appears, only ":$0.00"
1.3.8a having the same same settings with tax set to display even when 0 correctly shows description as "Sales Tax: $0.00". Seems like from 1.3.8a to 1.3.9a some bug fixes on the Tax calculation may have broken something.
Hope that helps!
Thanks for helping Rod. Right now am doing upgrade testing and am stuck because of this which would be a problem on our wholesale site.
Re: Tax name wont show up on order if tax is 0.00
A fix for this is included in the upcoming v1.3.9b which we hope to release any day.
Carry on with the rest of your upgrade. Applying the 139b updates will be very quick if you're already done upgrading to 139a ;)
Re: Tax name wont show up on order if tax is 0.00
Upgraded to 1.3.9b
Show Tax Display Status is set to 1 (show even when $0) after the upgrade tax lines that are not applicable to my customer are showing... they are technically $0 :smile: but since they don't apply to this customer they should not show:
Ontario Customer:
Sub-Total: $64.00
Shipping: $9.95
8% PST: $5.12
5% GST: $3.20
8% PST + 5% GST: $1.29
13% HST $0.00 (should not show - only for Eastern Canada NS, NF, NB)
Tax Exempt: $0.00 (for US customers only)
Total: $83.56
Any suggestions other than moving the 1.3.9a file back over?
Thanks!
Re: Tax name wont show up on order if tax is 0.00
You have two options:
a) set it to NOT display $0 when it comes to zero. (Most north american customers will be fine with that, and you're talking about such customers in your example)
b) let them show the $0 anyway, as it's no difference in the end ... they're not charged the tax that doesn't apply to them
Meanwhile, we'll look at the code some more.
The code changes for that from 1.3.9a to 1.3.9b were not contained in just one file. It was more complicated than that ;)
Re: Tax name wont show up on order if tax is 0.00
That was quite a chunk of code change between 1.3.9a & b wasn't it.
I'm not trying to be a smartass or anything, but something like I proposed earlier really may the the best solution, namely:
"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"
I didn't realise it when I suggested that, but I reckon it must have been in the back of my mind that outputting multiple tax classes each with a zero value would probably confuse/upset some people.
I never got around to trying my own suggestion though and it may not be as quite straightforward to implement as I imagine.
I'm also not 'happy' with the suggestion to use the text "TAX" as the generic output string... perhaps a DEFINE?
Cheers
Rod.
ps. Response not required/expected. You've better things to do :-)
Re: Tax name wont show up on order if tax is 0.00
k, currently testing this as a final fix.
n.b. this applies to 1.3.9b code only
in includes/functions/functions_taxes.php
the final function should be zen_get_all_tax_descriptions
you should replace that function with the code below
PHP Code:
function zen_get_all_tax_descriptions($country_id = -1, $zone_id = -1)
{
global $db;
if ( ($country_id == -1) && ($zone_id == -1) ) {
if (isset($_SESSION['customer_id'])) {
$country_id = $_SESSION['customer_country_id'];
$zone_id = $_SESSION['customer_zone_id'];
} else {
$country_id = STORE_COUNTRY;
$zone_id = STORE_ZONE;
}
}
$sql = "select tr.*
from (" . TABLE_TAX_RATES . " tr
left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id)
left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) )
where (za.zone_country_id is null
or za.zone_country_id = 0
or za.zone_country_id = '" . (int)$country_id . "')
and (za.zone_id is null
or za.zone_id = 0
or za.zone_id = '" . (int)$zone_id . "')";
$result = $db->Execute($sql);
$taxDescriptions =array();
while (!$result->EOF)
{
$taxDescriptions[] = $result->fields['tax_description'];
$result->moveNext();
}
return $taxDescriptions;
}
Re: Tax name wont show up on order if tax is 0.00
Thx for fixing this! Great work here guys!
Re: Tax name wont show up on order if tax is 0.00
Quote:
Originally Posted by
Argyle
Thx for fixing this! Great work here guys!
Who'd have thought that fixing "nothing" would have caused such a lot of head scratching and so much code?
Certainly not me.:blink:
I'm sure wilt will be pleased to know that it's finally right this time (so far). ;-)
Cheers
Rod