Page 30 of 32 FirstFirst ... 202829303132 LastLast
Results 291 to 300 of 318
  1. #291
    Join Date
    Jul 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Just to add a detail, using compounding Tax Rates is not necessary. The tax rules are 5% GST applied to the SubTotal, then 9.5% QST applied to the SubTotal+GST. However, the latter is the same as 9.975% QST applied to the SubTotal, with the SubTotal, 5% GST and 9.975% QST then arithmetically added to arrive at the total. So it can be either 9.5% QST compounded on 5% GST or 9.975% QST arithmetically added to 5% GST.

  2. #292
    Join Date
    Sep 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    I'm going to add that this may be a possible bug in version 1.5, as it was working correctly in 1.3.9.

    I've found the same issues with my current testing.

    Ray

  3. #293
    Join Date
    Oct 2011
    Location
    Toronto Canada
    Posts
    67
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Quote Originally Posted by RayDube View Post
    I'm going to add that this may be a possible bug in version 1.5, as it was working correctly in 1.3.9.

    I've found the same issues with my current testing.

    Ray
    In an earlier thread in this post I uploaded a zip file with all the settings that I used to configure the taxes for Canadian Store in Quebec - mine works as this was on version 1.5. If you read my notes (text file) - there were 2 fixes that I had to apply for version 1.5

    FIXES
    4A - Compound tax was not working correctly so I applied the following changes to includes/classes/order.php
    REMEMBER TO ALWAYS MAKE A BACKUP OF YOUR FILES BEFORE APPLYING ANY CHANGES!

    - open includes/classes/order.php and uncomment the if statement on line 523:
    Before = if ($taxDescription == $products_tax_description)...
    After = //if ($taxDescription == $products_tax_description)...

    - and replace:
    Code:

    $taxAdd = zen_calculate_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']
    + zen_round(zen_calculate_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']), $decimals);

    with this taken from v1.39:

    Code:

    $taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
    + zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);

    FIXES
    5A - Split Tax Shipping and descriptions were not working properly for Compound tax so I applied the following changes to includes/module/order_total/ot_shipping.php
    REMEMBER TO ALWAYS MAKE A BACKUP OF YOUR FILES BEFORE APPLYING ANY CHANGES!

    - open include/module/order_total/ot_shipping.php and uncomment the following code on line 21:
    Before = unset($_SESSION['shipping_tax_description']);
    After = //unset($_SESSION['shipping_tax_description']);

    - on about LINE 54 look for if ($shipping_tax_basis == 'Billing') {.....

    ADD THE FOLLOWING JUST ABOVE THIS - at about line 50
    //Begin SplitTaxLines modification
    //--------------------------------
    if (SHOW_SPLIT_TAX_CHECKOUT == 'false')
    {

    - on about LINE 78 look for if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);


    ADD THE FOLLOWING JUST BELOW THIS - at about line 79

    } else {
    //split the taxes
    if ($shipping_tax_basis == 'Billing') {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    } elseif ($shipping_tax_basis == 'Shipping') {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    } else {
    if (STORE_ZONE == $order->billing['zone_id']) {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    } elseif (STORE_ZONE == $order->delivery['zone_id']) {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    } else {
    $shipping_tax = 0;
    }
    }

    //accumulate taxes from array
    foreach ($shipping_tax as $tax_entry_index=>$tax_entry_value)
    {
    $this_shipping_tax_amount = zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    $aggregate_shipping_tax_amount += $this_shipping_tax_amount;
    $aggregate_shipping_tax_description += " + " . $shipping_tax_description[$tax_entry_index];
    $order->info['tax_groups'][$tax_entry_index] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    $order->info['total'] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    }
    $order->info['shipping_tax'] += $aggregate_shipping_tax_amount;
    $order->info['tax'] += $aggregate_shipping_tax_amount;
    //preserve aggregate tax descriptions and amounts for session variables
    $_SESSION['shipping_tax_description'] = $aggregate_shipping_tax_description;
    $_SESSION['shipping_tax_amount'] = $aggregate_shipping_tax_amount;
    }
    Lead•Empower•Motivate
    Catherine S.
    Go2Guru

  4. #294
    Join Date
    Oct 2011
    Location
    Toronto Canada
    Posts
    67
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Quote Originally Posted by uniline1 View Post
    Just to add a detail, using compounding Tax Rates is not necessary. The tax rules are 5% GST applied to the SubTotal, then 9.5% QST applied to the SubTotal+GST. However, the latter is the same as 9.975% QST applied to the SubTotal, with the SubTotal, 5% GST and 9.975% QST then arithmetically added to arrive at the total. So it can be either 9.5% QST compounded on 5% GST or 9.975% QST arithmetically added to 5% GST.
    I used these settings and they work:
    I did not include Quebec in the Canada GST Zone - as the store is based in Quebec

    Tax Rates
    Priority Tax Class Zone Tax Rate Description:
    1 GST/HST/PST Canada GST Zone 5.00% 5% GST
    1 GST/HST/PST HST Zone - NB, NL, ON 13.00% 13% HST
    1 GST/HST/PST HST Zone - NS 15.00% 15% HST
    1 GST/HST/PST HST Zone - BC 12.00% 12% HST
    2 GST/HST/PST PST Zone - QC 9.50% PST (NB Priority 2 = compounded)
    1 GST/HST/PST PST Zone - QC 5.00% GST
    1 GST on Shipping HST Zone - BC 12.00% 12% HST
    2 GST on Shipping PST Zone - QC 9.50% PST (NB Priority 2 = compounded)
    1 GST on Shipping HST Zone - NS 15.00% 15% HST
    1 GST on Shipping HST Zone - NB,NL, ON 13.00% 13% HST
    1 GST on Shipping PST Zone - QC 5.00% GST
    1 GST on Shipping Canada GST Zone 5.00% 5% GST

    Screenshot attached of what mine comes out like - version 1.5 Name:  final-tax-shipping-LAYOUT-all-zones.jpg
Views: 222
Size:  19.4 KB
    Lead•Empower•Motivate
    Catherine S.
    Go2Guru

  5. #295
    Join Date
    Jul 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    I did look over your solution but I didn't think it should be necessary to make significant changes to the code when all that is necessary is to get two taxes calculating. That's surely meant to be a basic functionality that shouldn't need more than the right settings.

  6. #296
    Join Date
    Oct 2011
    Location
    Toronto Canada
    Posts
    67
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Quote Originally Posted by uniline1 View Post
    I did look over your solution but I didn't think it should be necessary to make significant changes to the code when all that is necessary is to get two taxes calculating. That's surely meant to be a basic functionality that shouldn't need more than the right settings.
    I applied those code changes for v1.5 if you are using v1.3 then you don't need to.
    Try using this module for Canadian taxes - just recently updated and works.


    If you can't see the link go to: Plugins and then search for Canadian Taxes and it will come up.

    This is the proper way to setup Canadian Taxes. V.1.0

    Please choose the province in which you do business and run ONLY that SQL file. They have been separated and altered to be accurate as of July 1st 2012.

    Either open and run in your Zen Cart Administration "Install SQL Patch" utility located under 'tools' or run in phpmyadmin.

    PLEASE NOTE:

    BACKUP YOUR DATABASE FIRST!

    These SQL files will remove all existing taxes and zone definitions. It is assumed that you are downloading this module because your store taxes and zone definitions do not work anyway. It is purposely done this way to clean up the incorrect settings that would remain otherwise.

    If you require additional zone definitions for shipping, you will need to add them in again after running this SQL file.

    There is a chance that you may have set your products to a tax that may have had a different ID associated with it. In this case we have provided the below SQL statement to globally change all of your products to use the taxes that you are going to install.

    So to be clear run this statement after you run your Tax setup SQL.

    UPDATE##products##SET##products_tax_class_id=1;


    Qdixon - Quentin Dixon
    GeekHost.ca
    Lead•Empower•Motivate
    Catherine S.
    Go2Guru

  7. #297
    Join Date
    Sep 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Two notes Catherine.

    First, in Quebec, you are still required to pay GST, so yes, Quebec does need to be included in the GST Zone.

    Second, your code modificaitons states:
    - open includes/classes/order.php and uncomment the if statement on line 523:
    Before = if ($taxDescription == $products_tax_description)...
    After = //if ($taxDescription == $products_tax_description)...

    However, the "After" note shows the line commented out, rather than "uncomment" as you instructed.

    Third, I agree with uniline, this is a feature that is not working correctly in the latest version of the script, so should be considered a bug.

    Ray

  8. #298
    Join Date
    Oct 2011
    Location
    Toronto Canada
    Posts
    67
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Quote Originally Posted by RayDube View Post
    Two notes Catherine.

    First, in Quebec, you are still required to pay GST, so yes, Quebec does need to be included in the GST Zone.

    Second, your code modificaitons states:

    However, the "After" note shows the line commented out, rather than "uncomment" as you instructed.

    Third, I agree with uniline, this is a feature that is not working correctly in the latest version of the script, so should be considered a bug.

    Ray[/COLOR]
    You are 100% correct - I will correct that wording - should say COMMENT OUT, not UN COMMENT.
    Lead•Empower•Motivate
    Catherine S.
    Go2Guru

  9. #299
    Join Date
    Oct 2011
    Location
    Toronto Canada
    Posts
    67
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Quote Originally Posted by gandalfsmith View Post
    In an earlier thread in this post I uploaded a zip file with all the settings that I used to configure the taxes for Canadian Store in Quebec - mine works as this was on version 1.5. If you read my notes (text file) - there were 2 fixes that I had to apply for version 1.5

    FIXES
    4A - Compound tax was not working correctly so I applied the following changes to includes/classes/order.php
    REMEMBER TO ALWAYS MAKE A BACKUP OF YOUR FILES BEFORE APPLYING ANY CHANGES!

    - open includes/classes/order.php and uncomment the if statement on line 523:
    Before = if ($taxDescription == $products_tax_description)...
    After = //if ($taxDescription == $products_tax_description)...

    - and replace:
    Code:

    $taxAdd = zen_calculate_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']
    + zen_round(zen_calculate_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']), $decimals);

    with this taken from v1.39:

    Code:

    $taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
    + zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);

    FIXES
    5A - Split Tax Shipping and descriptions were not working properly for Compound tax so I applied the following changes to includes/module/order_total/ot_shipping.php
    REMEMBER TO ALWAYS MAKE A BACKUP OF YOUR FILES BEFORE APPLYING ANY CHANGES!

    - open include/module/order_total/ot_shipping.php and uncomment the following code on line 21:
    Before = unset($_SESSION['shipping_tax_description']);
    After = //unset($_SESSION['shipping_tax_description']);

    - on about LINE 54 look for if ($shipping_tax_basis == 'Billing') {.....

    ADD THE FOLLOWING JUST ABOVE THIS - at about line 50
    //Begin SplitTaxLines modification
    //--------------------------------
    if (SHOW_SPLIT_TAX_CHECKOUT == 'false')
    {

    - on about LINE 78 look for if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);


    ADD THE FOLLOWING JUST BELOW THIS - at about line 79

    } else {
    //split the taxes
    if ($shipping_tax_basis == 'Billing') {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    } elseif ($shipping_tax_basis == 'Shipping') {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    } else {
    if (STORE_ZONE == $order->billing['zone_id']) {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
    } elseif (STORE_ZONE == $order->delivery['zone_id']) {
    $shipping_tax = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    $shipping_tax_description = zen_get_multiple_tax_rates($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    } else {
    $shipping_tax = 0;
    }
    }

    //accumulate taxes from array
    foreach ($shipping_tax as $tax_entry_index=>$tax_entry_value)
    {
    $this_shipping_tax_amount = zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    $aggregate_shipping_tax_amount += $this_shipping_tax_amount;
    $aggregate_shipping_tax_description += " + " . $shipping_tax_description[$tax_entry_index];
    $order->info['tax_groups'][$tax_entry_index] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    $order->info['total'] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $tax_entry_value);
    }
    $order->info['shipping_tax'] += $aggregate_shipping_tax_amount;
    $order->info['tax'] += $aggregate_shipping_tax_amount;
    //preserve aggregate tax descriptions and amounts for session variables
    $_SESSION['shipping_tax_description'] = $aggregate_shipping_tax_description;
    $_SESSION['shipping_tax_amount'] = $aggregate_shipping_tax_amount;
    }
    ***Please note that the fixes should say COMMENT OUT - not UNCOMMENT.
    Lead•Empower•Motivate
    Catherine S.
    Go2Guru

  10. #300
    Join Date
    Sep 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Configuring Taxes for Canadian Sites/Zones

    Hello Catherine,

    Perhaps the text attachment was a little more detailed, but the notes you've copied here cause me some concern.

    First you say to comment out the if statement with regards to the tax description (After = //if ($taxDescription == $products_tax_description)...) But then ask us to edit the contents of that if statement (which we just commented out)

    I haven't reviewed any further, thought maybe I was missing something.

    Of course, I'd like to know where the formula for the tax calculation is, to see if there is a difference in that function between 1.3.9 and 1.5 to see if there the reason for the changes between the two versions, as I'm starting to think that there is where the change should be made.

    Ray

 

 
Page 30 of 32 FirstFirst ... 202829303132 LastLast

Similar Threads

  1. v150 Canadian Taxes Contribution
    By Qdixon in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 31 Jul 2013, 02:03 AM
  2. PST/QST For Canadian Taxes
    By MVIP in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 6
    Last Post: 19 Nov 2011, 02:17 AM
  3. Help with Canadian Taxes
    By mommydesigns in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 12
    Last Post: 14 Oct 2008, 02:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR