Hello,
Sorry to post this, but I've read through the forums and although the forum on setting up Canadian Tax classes may help, it doesn't quite fit my problem. So here goes:
I would like to charge PST and GST on shipping costs, but I don't want it to show up on different lines(ie, a GST line for products, and a GST line for shipping, a PST line for products, and a PST line for shipping). I had someone edit the code so PST and GST will show up separately, but it's not including the tax on the shipping. Currently my site outputs:
Your Total
Sub-Total: $3.49 CDN
Zone Rates (Shipping to CA): $2.10 CDN
6.0% GST: $0.21 CDN
7.0% PST: $0.24 CDN
Total: $6.04 CDN
I want it to say something like:
Merchandise: $3.49 CDN
Zone Rates (Shipping to CA): $2.10 CDN
Sub-Total: $5.59
6.0% GST: $0.31 CDN
7.0% PST: $0.39 CDN
Total: $6.29 CDN
The modification used to make GST and PST be on separate line was:
Code:
if(stripos($key, 'BC') !== false) // We're in BC, show PST & HST separately
{
$pattern= '/([\d.]+)[%] ([A-Za-z]+)/';
preg_match_all($pattern, $key, $matches);
$num_tax_types = count($matches[0]);
$total_percent = array_sum($matches[1]);
for($tax_type = 0; $tax_type < $num_tax_types; $tax_type++)
{
$tax_val = $value * ($matches[1][$tax_type] / $total_percent);
$tax_title = $matches[1][$tax_type].'% '.$matches[2][$tax_type];
$this->output[] = array('title' => $tax_title . ':',
'text' => $currencies->format($tax_val, true, $order->info['currency'], $order->info['currency_value']),
'value' => $tax_val);
}
}
else
{
$this->output[] = array('title' => $key . ':',
'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
'value' => $value);
}
/// END MODIFICATION
So basically to have a new order total module that I can install and activate which will include the Sub-Total + shipping, and then this will be called the new "sub-total" and be used as the basis to calculate tax. Since all my products are taxable it doesn't really matter if zencart checks each product included in sub-total for tax class, although for a good sub-total+shipping module it should. Potentially tax could still be calculated from the new Merchandise (the old sub-total) and then added to this could be the tax on the difference between Subtotal and merchandise, and all that summed in one line. Is there anything you can recommend? My site is already live so I'd like to fix this ASAP!
Thanks!
Bookmarks