@dharrison, would you set Configuration->Edit Orders->Debug Action Level to "TOTALS" and send me the file directly?
Are you receiving the EO warning message that indicates that the store's two "Display Prices with Tax" settings are not the same?
Printable View
@dharrison, would you set Configuration->Edit Orders->Debug Action Level to "TOTALS" and send me the file directly?
Are you receiving the EO warning message that indicates that the store's two "Display Prices with Tax" settings are not the same?
Hi @lat9
I do get the warning messages:
I have also set debug to TOTALS as requested and zipped the log and emailed to you.Quote:
Success: Order has been successfully updated.
Warning Warning: You have configured Zen Cart to display prices with tax. This page is currently displaying prices without tax.
Hi mc
I have tried that and after the initial adjustment, the final total remains the same. The VAT goes down to normal level if you click update again, but that total remains the same.
There is a few components in the sub-total but it was accurate except for when the order is edited.
Anyway I have tried with a 40% discount:
On clicking Update this changes toQuote:
Sub-Total: £459.00
Free Shipping Options (Ex-Works): £0.00
Trade Discount: -£183.60
UK VAT @ 20%: £55.08
Total: £330.48
Clicking Update again this time, the VAT remains the same.Quote:
£459.00
Add Product
Sub-Total: £459.00
Trade Discount: -£183.60
UK VAT @ 20%: £55.08
Total: £293.76
Well, that does come out to reflect that on edit, the trade discount is taxed 20% and that tax is being subtracted from the bottom line total. So the two tests show that on update for some reason the final total is being reduced by an "unpublished" tax but it is all based on the above values and not on some "reuse" of the current final. Should help to figure out what's going on as one reviews the code. Not sure if more info than what has been provided is needed.
Thanks mc
Thanks for the insight. One of the Trade Discount (Group pricing) module settings is:
I will try without the re-calculate tax and go from thereQuote:
Trade Discount
This module is installed
true
Sort Order
290
Include Shipping
false
Include Tax
false
Re-calculate Tax
Standard
Tax Class
--none--
Nope it's made no difference. :cry:
I can set up a test login if that would help.
Yes, unfortunately, those EO logs weren't particularly helpful. PM sent.
Things with taxes will NOT work correctly if these are different. Thus the warning printed at the top.
This setting is used by various Zen Cart functions when calculating the tax, not just for "display". When enabled Zen Cart stores the product price in the order as (product price + tax). When disabled it stores just the product price.
So with your settings when a customer places an order the product is saved without tax in the database. When you open the order for editing with your settings, you are telling the Zen Cart functions the tax is already included with the product price (so it removes it from the total).
Thanks, @lhungil (I was hoping that you'd chime in!), that's part of the conclusion I'd arrived at as well (although I didn't "see" where the storefront/admin discrepancy beween the two settings had bearing in this instance) ...
The store's setting for Display Prices with Tax was changed from true to false, resulting in total-calculation issues when EO was then used to edit an order created while the setting was true.
Part of EO's total-processing involves backing-out all product-price (and tax, if indicated) values from the order's subtotal, total and tax elements prior to any re-calculation. So, an order that was created when DPwT was set to true will not have the applicable taxes backed-out from this calculation, resulting in (as you've seen) an incorrect Total value being calculated for the order.
I'm not sure why EO does that back-out, but perhaps @lhungil could fill in some of the EO history as to why the processing is as it is!
In any case, I suggest to @dharrison that a procedure be defined for this store's admins such that they don't use EO on any orders that were created when the DPwT setting was true as a work-around to the display issue.
Thanks all 3 of you for your help. I would be intrigued to get an insight into the EO history as well.
Happy days (?)