Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Posts
    3
    Plugin Contributions
    0

    red flag Possible bug in group discount and vat handling

    Hi!

    I am just setting up my first Zen Cart installation and experimenting with the various features. While testing the group pricing functions I might have came across a bug in 1.3.8a.
    My setup is as follows:

    Group discount
    This module is installed
    true
    Sort Order
    290
    Include Shipping
    false
    Include Tax
    false
    Re-calculate Tax
    Standard
    Tax Class
    Áfa

    result:
    40000Ft = Order total
    33800Ft = Shipping
    -20000Ft =Group Discount
    7380Ft = Tax 20%
    61180Ft = Total

    with the tax calculation changed to None:

    Rendelés összege:
    40000Ft = Order total
    33800Ft = Shipping
    -20000Ft = Group Discount
    7380Ft = Tax 20%:
    68560Ft =Összesen


    However this is what is should display:
    40000Ft = Order total
    33800Ft = Shipping
    -20000Ft = Group Discount
    10760Ft = Tax 20%:
    64560Ft =Összesen

    Both the total fields and the tax is wrong, since
    1.) The system is set to give discount only on the product itself, not shipping. (the deduction is correct, it this case 50% from the product). While when calculating the taxes does Zen does deduct 50% from the shipping as well (what it shouldn't do as the discount is only valid for the product)
    2.) in the second case the total is not correnct. the numbers just don't add up

    Can you confirm that this is a bug (and not a feature :) and direct me to a solution. I tried to hack myself, but with no luck yet.

    regards
    Tamas

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Possible bug in group discount and vat handling

    Perhaps this is the issue mentioned here:
    http://www.zen-cart.com/forum/showpo...3&postcount=10
    .

    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.

  3. #3
    Join Date
    Jan 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Possible bug in group discount and vat handling

    Quote Originally Posted by DrByte View Post
    Perhaps this is the issue mentioned here:
    http://www.zen-cart.com/forum/showpo...3&postcount=10
    No, mine is not a division by zero thing (especially since I have items in cart).

    The strange thing is that when I set the Re-calculate tax to Credit note than tha TAX is fine, but the order total isn't...

    I tried editing the ot_group_prcing.php to see if there is something wrong there, I just couldn't find anything.

  4. #4
    Join Date
    Feb 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: Possible bug in group discount and vat handling

    I had same problem. To resolve I set Re-calculate tax to Credit Note to get the tax calculation correct then changed the following line in ot_group_pricing.php:

    if ($this->calculate_tax == "Standard") $order->info['total'] -= $tax;

    to:

    if ($this->calculate_tax == "Standard" || $this->calculate_tax == "Credit Note") $order->info['total'] -= $tax;

    Problem solved.

 

 

Similar Threads

  1. Replies: 18
    Last Post: 12 Mar 2010, 06:37 PM
  2. Edit Orders addon bug: Group Discount Stored Value wrong
    By JTheed in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 4 Jun 2008, 04:18 PM
  3. again tax/VAT being calculated on subtotal ignoring group discount
    By SarahL in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 8
    Last Post: 8 Apr 2008, 06:42 PM
  4. Discount Coupon AND Group Discount Tax Problem
    By mrkrinkle in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 11
    Last Post: 5 Apr 2007, 12:16 PM
  5. Replies: 1
    Last Post: 16 Aug 2006, 11:31 PM

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