Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Sep 2008
    Posts
    25
    Plugin Contributions
    0

    Default reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-included pr

    I'm running 1.3.9d and still have the same tax problems as in 1.3.8 involving tax calculation and group discounts
    The issue is said to be solved in 1.3.9 but it isn't

    Here's what's happening:

    These results are all correct when buying a product with free shipping:

    Sub-Total:€16.95
    Free Shipping Options (Free Shipping):€0.00
    Group Discount:-€5.09
    TAX 6%:€0.67
    Total:€11.86

    I was very happy about this, since this wasn't working correct in 1.3.8. But now there's the problem when adding shipping costs/tax

    Once I choose flat rate shipping (TAX 19%) it messes up everything:

    Sub-Total:€16.95
    Flat Rate (Best Way):€5.65
    Group Discount:-€4.82 -- incorrect
    TAX 6%:€0.81 --incorrect
    TAX 19%:€0.76 --incorrect
    Total:€17.78 --incorrect

    I've tried every sort order in ordertotal, every config in shipping and in grouppricing, nothing seems to help.

    Please reopen this issue, or please help me with this.

    Greetings Antonios

  2. #2
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    This does not only affect the group discount, but basicly every discount module... They are flawed.

    I had to rewrite ALL of them to get a rest for my soul, because they were always calculating things wrong.

    And no, it's not about settings, when you strip the code line by line and think it logically, you will realize that it calculates things wrong in it's logic... mostly regarding to shipping costs.
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  3. #3
    Join Date
    Sep 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    Hello Pasi,

    Thanks for replying.
    Glad it wasn't just me, thought I was missing something.

    Can you tell me which lines you rewrote or is that too much to write down here.

    Greetings Antonios

  4. #4
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    If you are running v139, then try this

    In includes/modules/order_totals/ot_group_pricing.php at around line 67 you should see a commented out line

    PHP Code:
    //    if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax']; 
    and remove the // so the line is no longer commented, and test again.

    Note. while I have tested this fix with some other variations of group discount and tax with no deleterious results, I have not tested enough combinations yet, to say whether its the correct fix for all use cases.

  5. #5
    Join Date
    Sep 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    Hello Wilt,

    I've tried your fix, but it doesn't make a difference.
    I've tried it in combination with every possible setting but unfortunately it didn't help.

    I'm getting really pissed off by this bug. Group discount is quite an essential feature for webshops, at least it is for ours.. It does work, if you don't charge shipping costs with tax which is obligatory in the netherlands.

    Well, if anyone has a hint, please feel free to write it down.

    Greetings Antonios

  6. #6
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    k, can you post what you expect the output to be.

    I'm setting up something that uses all the settings you have, and will post back here shortly with what current code does output.

  7. #7
    Join Date
    Feb 2005
    Location
    UK
    Posts
    76
    Plugin Contributions
    0

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    I am also having a similar problem with the discount not calculation properly, I posted a thread here
    http://www.zen-cart.com/forum/showthread.php?t=154755
    some time ago but I never had a reply
    Not sure if its related to this problem or not.
    Any input appreciated

  8. #8
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    k,

    The fix I gave definitely works, and produces correct totals, EXCEPT if you have split tax lines. e.g. where each tax group is shown as a separate line in checkout confirmation.

    While the total of the taxes is correct, the individual lines are not.

    I have a fix for that as well, and i'm just testing at the moment

  9. #9
    Join Date
    Sep 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    Hello Wilt,

    Here's what I'm trying to achieve.

    First I should say I use two tax rates: 6% and 19%
    Second I use discount groups, for loyal customers etc.
    And third the shop displays prices incl tax.

    When a customer in my discount group orders for €100.00 incl 6% tax this is what the calculation must look like:

    Sub-Total: €100.00
    Group Discount 30%: -€30.00
    Shipping cost (incl 19%): €5.65
    TAX 6%: €3.96
    TAX 19%: €0.90
    Total: €75,65

    The group discount is subtracted from the subtotal with tax included, so the tax mentioned should be calculated after the discount is subtracted

    When there are no shipping costs charged, the calculation is correct.
    Even when a customer orders products with 6% tax AND products with 19% tax the calculation is correct (as long as there are no shipping costs).

    Things only get messed up when shipping cost are charged.

    Greetings Antonios

  10. #10
    Join Date
    Sep 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: reopen thread [Done v1.3.9] Discount groups and tax calc problem with tax-include

    One thing I'd like to add:
    When a customer orders products (any tax) and is NOT in a discount group the calculation is also correct, even when shipping costs are charged.

    So it's clear that the problem is where there's a combination of shipping costs/tax and discount groups.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Discount coupon giving too much off with tax-included pricing enabled
    By nigelt74 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 16 Apr 2014, 11:05 AM
  2. Replies: 26
    Last Post: 19 Mar 2010, 04:45 PM
  3. Replies: 0
    Last Post: 13 Jun 2008, 12:57 PM
  4. Tax not being calculated correctly -- with tax-included pricing
    By nkrcs in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 11 Jun 2008, 07:54 PM
  5. Replies: 2
    Last Post: 13 Aug 2006, 11:46 AM

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