Administrator
- Join Date:
- Sep 2009
- Location:
- Stuart, FL
- Posts:
- 14,066
- Plugin Contributions:
- 56
Edit Orders v4.0 Support Thread
Note also that Edit Orders uses the Configuration->My Store->Display Prices with Tax setting in its calculations.
Views: 346,050
Administrator
Note also that Edit Orders uses the Configuration->My Store->Display Prices with Tax setting in its calculations.
Zen Follower
Hi Cindy
Configuration->My Store->Display Prices with Tax ** False**
Configuration->My Store->Display Prices with Tax Admin True
The latter had to be set to true as it was displaying the same price including and excluding vat.
The discount trade is set by Customers > Group Pricing and assigned to an individual customer on registration/approval. I believe this is a standard setup in the ZenCart software.
What seemed to be happening originally, is the tax was doubling.
I hope this provides some insight.
Totally Zenned
lat9:
What are your store's settings for:
Configuration->My Store->Display Prices with Tax
Configuration->My Store->Display Prices with Tax AdminWhere did the "Trade Discount" order-total come from? Does it rely on the "storefront environment" to perform its calculations?
I'm having a hard time seeing where the totals' difference "went", as the difference is 36.90 (which isn't any of the listed values).
Not sure why, but 36.90 is 20% * 184.50 which is both tax on the trade discount as well as the 20% tax on the total amount if delivery wasn't included in a sub-total.
Might almost be interesting to see if upon re-edit if the value would go down again. Another would be to alter the trade discount as a general factor from the onset of a test purchase and see how the values change. Working with a 50% value somewhat means that the data could come from either the reduction or from the pre-total. Perhaps momentarily reduce the reduction (thus not losing out on some in process cash flow) or apply it to some test product, but do the same thing with that item as was done above and see how it changes.
Administrator
@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?
Zen Follower
Hi @lat9
I do get the warning messages:
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.
I have also set debug to TOTALS as requested and zipped the log and emailed to you.
Zen Follower
mc12345678:
Not sure why, but 36.90 is 20% * 184.50 which is both tax on the trade discount as well as the 20% tax on the total amount if delivery wasn't included in a sub-total.
Might almost be interesting to see if upon re-edit if the value would go down again. Another would be to alter the trade discount as a general factor from the onset of a test purchase and see how the values change. Working with a 50% value somewhat means that the data could come from either the reduction or from the pre-total. Perhaps momentarily reduce the reduction (thus not losing out on some in process cash flow) or apply it to some test product, but do the same thing with that item as was done above and see how it changes.
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:
Sub-Total: £459.00
Free Shipping Options (Ex-Works): £0.00
Trade Discount: -£183.60
UK VAT @ 20%: £55.08
Total: £330.48
On clicking Update this changes to
£459.00
Add Product
Sub-Total: £459.00Trade Discount: -£183.60
UK VAT @ 20%: £55.08
Total: £293.76
Clicking Update again this time, the VAT remains the same.
Totally Zenned
dharrison:
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 to
Clicking Update again this time, the VAT remains the same.
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.
Zen Follower
Thanks mc
Thanks for the insight. One of the Trade Discount (Group pricing) module settings is:
Trade Discount
This module is installed
trueSort Order
290Include Shipping
falseInclude Tax
falseRe-calculate Tax
StandardTax Class
--none--
I will try without the re-calculate tax and go from there
Zen Follower
Nope it's made no difference. :cry:
I can set up a test login if that would help.
Administrator
Yes, unfortunately, those EO logs weren't particularly helpful. PM sent.
Totally Zenned
dharrison:
Hi Cindy
Configuration->My Store->Display Prices with Tax ** False**
Configuration->My Store->Display Prices with Tax Admin True
...
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).
Administrator
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.
Zen Follower
Thanks all 3 of you for your help. I would be intrigued to get an insight into the EO history as well.
Happy days (?)
Totally Zenned
lhungil:
This error is probably because of the minimal info mod (if it does not add a billing or delivery address to the order in the database).
@Lat9
Did you ever find a fix for this?
Administrator
picandnix:
@Lat9
Did you ever find a fix for this?
I'm not sure what **this **is, but if **this **is the warnings issued about the missing shipping address when an order contains only virtual products, then the answer is currently "no".
Totally Zenned
lat9:
I'm not sure what **this **is, but if **this **is the warnings issued about the missing shipping address when an order contains only virtual products, then the answer is currently "no".
Sorry yes, this was that :grin:
Administrator
Tee-hee! I've noted the change-request in EO's GitHub repository.
Totally Zenned
lat9:
Tee-hee! I've noted the change-request in EO's GitHub repository.
Thank you Cindy :hug:
Zen Follower
I this warning address message on all my orders that contain only virtual items. It's not really an issue except when the order should have taxes. If I try to edit the order, I lose everything about the taxes even if I do write the required percentage in the TAX box.
Warning: One or more of the customer address fields contains a country name unknown to Zen Cart ("Locations / Taxes"->"Countries").
Taxes and some shipping modules may not function correctly until the issue has been resolved.This typically occurs if someone deletes or renames a country's name from Zen Cart ("Locations / Taxes"->"Countries"). You can fix the issue by doing one of the following: •Add the country (and name) back to the Zen Cart database.
•Adjust the country name to match one of the country names in the Zen Cart database.
All my countries and set up for zone and description and such are done. I don't know what to do to have EO calculate the taxes as it should. I have to go directly to the database and manually add the info. Is there a way to fix this? I've search the thread but so far no luck as I don't have any modification to my files except for EO so far.
Administrator
@marieAA, I've reproduced your issue and noted it in the plugin's GitHub repository. I should have a solution "shortly".
Fields marked required must be completed.
Tell staff why this post should be reviewed.