Yes, I did a normal purchase of the same product from the store-side. As noted above, the total is correct. See Store order detail.jpg file in post 1198, list item 5, and the first file attached.
Printable View
Yes, I did a normal purchase of the same product from the store-side. As noted above, the total is correct. See Store order detail.jpg file in post 1198, list item 5, and the first file attached.
one created by by my modified Admin New Order.
Comparing the database tables did not reveal anything unusual except the orders_total table for ot_total class was different, as expected. Also, the order of the classes in the orders_total table differed, with ot_shipping being the last entry for the order created using Admin New Order/ Edit Orders, but I don't think this is an issue.
I have struggled through the Edit Order code and debug log for the order. After the product is added and before shipping is added, at the step where getOrderInfo is called by edit_orders.php on line 655, everything looks correct including ot_total at this point. At the point where eo_update_database_order_totals, taxes/totals on entry called by edit_orders.php on line 656, everything looks correct. Then Checking taxes for ot_quantity_discount is encountered, followed by eo_update_database_order_totals, after_adjustments. After checking the order for virtual status, eo_update_database_order_totals, after process shows the first occurrence where order_total is incorrect. It's too low by the tax on the quantity discount. Specifically $order->info['total'] is wrong at this point.
Problem is, I get lost trying to follow the code in store-side ot_total class, which I think is called just before $order->info['total'] is printed at the point above. Any help would be appreciated. Could this problem be associated with the fixes for GitHub issue #56?
The issue has something to do with how Admin Add New Order does its processing and does not, IMO, have anything to do with issue #56.
Might I suggest an alternate approach to creating orders for customers: Encrypted Master Password. That allows you and/or a group of admins to place an order on behalf of the customer, logging into the customer's account with their admin password.
I respectfully disagree. I just ran another case where I created an order on the store-side, then went to edit orders. I added a product with a quantity discount in edit orders. The subtotal, discount, shipping, and tax were correct, but the order total was too low by $0.06. Then I clicked update, got a successful update message, and the subtotal, discount, shipping, and tax were the same and correct, but the order total was too low by the tax on the discount, exactly the same behavior that I saw when editing an order started in Admin New Order. I think there's a problem with Quantity Discount or a problem in Edit Orders with discounts. I plan to run further tests. Sorry for being a PIA on this problem.
There's a bug and correction in Quantity Discounts, reported in Quantity Discounts support thread in post #805. It has no effect on what I'm seeing in EO. I get the same result with and without the patch. The patch was in for my initial testing of EO. Then I took it out for my later testing and put it back in for tests after post #1207.
Please note that problems with the order total when a product with quantity discount is added in EO occurs without me using Quantity Discount in the EO drop-down menu.
I hope the information I am posting is helpful to you. If you want me to run specific test cases, I would be glad to do so.
Ran a case where a product with quantity discount was ordered on the store-side. Subtotal, discount, shipping, tax and total were all correct on the store side. Went in to EO to add a non-discountable taxable product. At EO entry, the subtotal, discount, shipping, tax and total were all correct. After adding a non-discountable product and before clicking update, the subtotal, discount, shipping, and tax were correct, but the total was incorrect but not by an amount equaling the tax on the discount. After clicking update, subtotal, discount, shipping, and tax were correct, and the total was too low by the tax on the discount, as I have been reporting.
So, it makes no difference whether the quantity discountable product was in the store order or added in EO, the result is the same. The order total is too low by the tax on the discount after clicking update.