Page 124 of 188 FirstFirst ... 2474114122123124125126134174 ... LastLast
Results 1,231 to 1,240 of 1873
  1. #1231
    Join Date
    Jun 2012
    Posts
    452
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    I'm just grasping at straws at this point. I hope you two can figure this out!

    It would be nice to know what $order->info['total'] and $order->info['tax'] is supposed to include and what is not to be included at the point in EO logic "after adjustments" in the EO debug logs.

  2. #1232
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    Same problem occurs with Group Discounts. Run the order with no discount, add the customer to a discount group, edit the order - the total is wrong.

    Group Discount include tax = false, include shipping = false, recalculate tax = standard.

    Original Order:
    Sub-Total $500
    FL Tax 7% 35.00
    Total $535.00


    Add Group discount of 25%:

    Sub-Total $500
    Group Discount $125
    FL Tax 7% 26.25
    Total $392.50

    should be $401.25.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #1233
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by swguy View Post
    Are you thinking about something else maybe? The built-in Group Pricing module is an order total module just like the Quantity Discounts order total module. It doesn't change prices. It gives you a single line item discount.
    Yep, I was thinking about the built-in quantity discounts' processing.

  4. #1234
    Join Date
    Jun 2012
    Posts
    452
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    If I trick function eoGetOrderTotalTax to return the tax on the quantity discount and make it a negative quantity, the order total and order tax is correct. In my test cases, the discount is $5.00 and the tax is 6%, or $0.30. See code below.
    Code:
            // -----
            // Cycle through the order-totals to see if any are currently taxed.  If so, remove the
            // tax from the current order in preparation for its recalculation.
            //
            foreach ($order->totals as $current_total) {
                if (in_array($current_total['class'], array('ot_subtotal', 'ot_tax', 'ot_shipping', 'ot_total'))) {
                    continue;
                }
                $current_total_tax = $eo->eoGetOrderTotalTax($oID, $current_total['class']);
                $current_total_tax = -0.3; // trick out function for test case
                $order->info['tax'] -= $current_total_tax;
            }

  5. #1235
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Dave224 View Post
    If I trick function eoGetOrderTotalTax to return the tax on the quantity discount and make it a negative quantity, the order total and order tax is correct. In my test cases, the discount is $5.00 and the tax is 6%, or $0.30. See code below.
    Code:
            // -----
            // Cycle through the order-totals to see if any are currently taxed.  If so, remove the
            // tax from the current order in preparation for its recalculation.
            //
            foreach ($order->totals as $current_total) {
                if (in_array($current_total['class'], array('ot_subtotal', 'ot_tax', 'ot_shipping', 'ot_total'))) {
                    continue;
                }
                $current_total_tax = $eo->eoGetOrderTotalTax($oID, $current_total['class']);
                $current_total_tax = -0.3; // trick out function for test case
                $order->info['tax'] -= $current_total_tax;
            }
    Unfortunately, the keyword there is trick; I'm looking for a reliable way to regenerate any tax applied by those order-total modules.

  6. #1236
    Join Date
    Jun 2012
    Posts
    452
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    The "trick" was to demonstrate that the problem is that quantity discounts is not processed properly in function eoGetOrderTotalTax. If MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_TAX_CLASS were defined, the function would get the tax on the discount from the database, and no trick would be required. I'm trying to be helpful. If I'm not, tell me and I'll go away.

  7. #1237
    Join Date
    Jun 2012
    Posts
    452
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Dave224 View Post
    The "trick" was to demonstrate that the problem is that quantity discounts is not processed properly in function eoGetOrderTotalTax. If MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_TAX_CLASS were defined, the function would get the tax on the discount from the database, and no trick would be required. I'm trying to be helpful. If I'm not, tell me and I'll go away.
    Should be "...the function would calculate the tax from the discount value in the database, and ...

  8. #1238
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,346
    Plugin Contributions
    94

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Dave224 View Post
    The "trick" was to demonstrate that the problem is that quantity discounts is not processed properly in function eoGetOrderTotalTax. If MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_TAX_CLASS were defined, the function would get the tax on the discount from the database, and no trick would be required. I'm trying to be helpful. If I'm not, tell me and I'll go away.
    Dave, you are being helpful and realize that the issues' source is based on the lack of "standardization" of how various order-total modules choose to apply/remove any tax-based values.

  9. #1239
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    Dave, you are being helpful and realize that the issues' source is based on the lack of "standardization" of how various order-total modules choose to apply/remove any tax-based values.
    I think most modules have a _CALC_TAX setting, and the use of "Standard" is pretty common. You could start with that.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #1240
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,290
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by Dave224 View Post
    If MODULE_ORDER_TOTAL_QUANTITY_DISCOUNT_TAX_CLASS were defined, the function would get the tax on the discount from the database, and no trick would be required.
    This is still a trick. As I said earlier, the TAX_CLASS variables were defined to support Credit Notes. You're overloading it to mean something else. This is not a good approach.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 804
    Last Post: 18 Apr 2025, 12:04 AM
  2. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  3. Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 656
    Last Post: 18 Apr 2016, 06:28 PM
  4. v139h Super Orders v3.0 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1018
    Last Post: 28 Apr 2014, 11:38 PM
  5. RE: Super Orders v3.0 Support Thread
    By Johnnyd in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jun 2011, 09:28 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