Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Discount Coupon AND Group Discount Tax Problem

    I have a problem with tax calculations where a Discount Coupon and a Group Discount apply...

    Sub-Total: $10.00
    Shipping Not Applicable: $0.00
    Discount Coupon (25%): -$2.50
    Group Discount (10%): -$0.72
    GST (10%): $0.75
    Total: $7.53

    The GST is calculating with the Discount Coupon but not the Group Discount.

    The Group Discount options are:

    Include Shipping
    true

    Include Tax
    false

    Re-calculate Tax
    Credit Note

    Tax Class
    GST

    And the Discount Coupon options are;

    Include Shipping
    true

    Include Tax
    false

    Re-calculate Tax
    Credit Note

    Tax Class
    GST

    Zen Cart version is 1.3.0.1.

    On it's own the Group Discount works;

    Sub-Total: $10.00
    Shipping Not Applicable: $0.00
    Group Discount (10%): -$1.00
    GST (10%): $1.00
    Total: $10.00

    As does the Discount Coupon on it's own;

    Sub-Total: $10.00
    Shipping Not Applicable: $0.00
    Discount Coupon (25%): -$2.50
    GST (10%): $0.75
    Total: $8.25

    Any Clues?

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Discount Coupon AND Group Discount Tax Problem

    Have you tried restoring the default settings for both modules?

  3. #3
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Discount Coupon AND Group Discount Tax Problem

    What are the defaults?

    I have tried all different combinations but I need the Discounts to be applied pre-tax...

  4. #4
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Re: Discount Coupon AND Group Discount Tax Problem

    I have recreated the scenario on my test site which is v1.3.0.2 and still have the sam problem...

    This is what it should look like according to my calculations;

    Sub-Total: $10.00
    Shipping (Flat Rate): $5.00 = $15.00
    Discount Coupon (10%): -$1.50 = $13.50
    Group Discount (10%): -$1.35 = $12.15
    GST Tax (10%): $1.21 = $13.36
    Total: $13.36

    As you can see below the GST Tax does not re-calculate after the Group Discount;

    Sub-Total: $10.00
    Shipping (Flat Rate): $5.00
    Discount Coupon (10%): -$1.50
    Group Discount (10%): -$1.35
    GST Tax (10%): $1.35
    Total: $13.50

    The GST Tax and Total appear to be wrong.
    If I swap the order of the Discount Coupon so it is calculated after the Group Disount I get this;


    Sub-Total: $10.00
    Shipping (Flat Rate): $5.00
    Group Discount (10%): -$1.50
    Discount Coupon (10%): -$1.50
    GST Tax (10%): $1.35
    Total: $13.35

    The Discount Coupon, GST Tax and Total appear to be wrong although Total is only 1c out and may be rounding issue.
    If I revert to either the Group Discount or Discount Coupon on their own then it works fine;


    Sub-Total: $10.00
    Shipping (Flat Rate): $5.00
    Group Discount (10%): -$1.50
    GST Tax (10%): $1.35
    Total: $14.85

    Sub-Total: $10.00
    Shipping (Flat Rate): $5.00
    Discount Coupon (10%): -$1.50
    GST Tax (10%): $1.35
    Total: $14.85


    INFO

    The Zen Cart Version is 1.3.0.2, the Shipping and product are both taxable.
    Both Disount Coupon And Group Discount have the following settings;

    This module is installed
    true
    Sort Order
    280
    Include Shipping
    true
    Include Tax
    false
    Re-calculate Tax
    Standard
    Tax Class
    --none--

    Can anyone help or have you had a similar issue?

    Cheers
    Will

  5. #5
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Re: Discount Coupon AND Group Discount Tax Problem

    I think I have worked out where my problems are coming from...

    When you have taxable and non-taxable items and you apply a discount (Coupon or Group), does the discount subtract from the taxable item or the non-taxable or both, an if both how does it calculate the percentage. This calculation obviously effects the tax payable on the order...

    Does anyone know how this works?

    Cheers
    Will

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Discount Coupon AND Group Discount Tax Problem

    Before pulling any more hair, you might want to fix a small bug:

    includes/modules/order_total/ot_group_pricing.php
    line 21 has:
    PHP Code:
          $this->credit_tax MODULE_ORDER_TOTAL_GROUP_PRICING_CREDIT_TAX
    change it to:
    PHP Code:
          $this->tax_class MODULE_ORDER_TOTAL_GROUP_PRICING_TAX_CLASS

    As an addendum, the "include shipping" and "include tax" settings, if set to "true", work like this:
    "Order Total" minus "Shipping Costs" minus "Tax Amount" = "Amount to apply discount to"
    ie: $50.00 - $3.50 - $2.80 = $43.70 .... if discount rate is 10%, then the discount will be $4.37

    Hope that helps clarify some of how it works.
    .

    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.

  7. #7
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Re: Discount Coupon AND Group Discount Tax Problem

    Thanks DrByte,

    However I want the Discount to re-calculate the tax. ie. I want the discount to come off the pre-tax figure and then the tax to be calculated.

    I have "Include Shipping" set to true but not "Include Tax". I want it to do;

    Subtotal (pre-tax) + Shipping - Discount >> calculate tax

    I guess my question is if I had taxable and non-taxable product in the order;

    A: Can I do this?

    B: If I did, would the discount come from the taxable product or the non taxable product as this obviously woud effect the outcome of the tax calculation?

    I am trying to work out how Zen Cart gets the Tax amount that it does in this example... (ignore the "GST Incl" on the subtotal)




    Thanks for your time...

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Discount Coupon AND Group Discount Tax Problem

    Things I'd do:
    1. write down all payment-module settings
    2. paste them here (without passwords)
    3. "remove" and re-"install" them

    4. write down all shipping-module settings
    5. paste them here
    6. "remove" and re-"install" them

    7. write down all order-total module settings
    8. paste them here
    9. "remove" and re-"install" them ... WITHOUT EDITING SETTINGS or SORT ORDERS etc.

    10. post tax-configuration settings from My Store and from the zones-definitions, tax-classes, and tax-rates.
    .

    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.

  9. #9
    Join Date
    Jun 2006
    Posts
    27
    Plugin Contributions
    0

    Re: Discount Coupon AND Group Discount Tax Problem

    I don't really want to uninstall everthing at this stage as it is live however...

    When you have taxable and non-taxable items and you apply a discount (Coupon or Group Discount), does the discount subtract from the taxable item or the non-taxable or both?

    If both, how does it calculate the amounts to discount from the taxable and non-taxable items?


    Anbody know the standard processes that applies here?

    Thanks,
    Will

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Discount Coupon AND Group Discount Tax Problem

    Well, if you're not ready to remove and do deep testing, can you do the steps I mentioned, without actually removing the modules? As well as all the details of the redeemed coupon, the group-discount rates, and the zones info I requested.

    The math works in various ways depending on all your settings... It's not a simple algorithm.

    Basically, tell me how to reproduce what you're experiencing, and then we can work on finding out what's causing it vs making it work differently.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Problem with custom Group Pricing and Discount Coupon
    By mvstudio in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 2 Aug 2011, 04:20 PM
  2. Replies: 18
    Last Post: 12 Mar 2010, 06:37 PM
  3. Group Discount and tax problem -- has it been resolved?
    By jazznuts699 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 4 Aug 2009, 09:01 PM
  4. Group Discount + Coupon = wrong tax calculation (Ontario store)
    By Rebelwax in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 24 Mar 2008, 07:20 PM
  5. Group Discount and Coupon Codes?
    By SweetNSassyRobin in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 20 Aug 2007, 12:07 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