You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Ingo Wolfmayr (JIRA)" <ji...@apache.org> on 2018/01/31 11:22:00 UTC
[jira] [Created] (OFBIZ-10190) Update order calculation
Ingo Wolfmayr created OFBIZ-10190:
-------------------------------------
Summary: Update order calculation
Key: OFBIZ-10190
URL: https://issues.apache.org/jira/browse/OFBIZ-10190
Project: OFBiz
Issue Type: Improvement
Components: order
Affects Versions: Release Branch 16.11, Release Branch 15.12, Trunk, Release Branch 14.12, Release Branch 13.07
Reporter: Ingo Wolfmayr
Attachments: ofbiz.patch
When creating an order with a promotion the tax value is wrong after updating the order if a promotion is involved.
Order --> Edit Items --> update selected items
Example:
*initial:*
item1 $200
Promo -$10 (simple promotion -5%)
Tax 20%: $38.00
Tax adj: -$2
--> $ 218.00
*update:*
item1 $200
Promo -$20 (changed promotion to -10%)
Tax 20%: $38.00
*{color:#d04437}Tax adj: -$2{color}*
--> $ 218.00
Attached a patch to fix it:
1) Calc promotion before tax
2) enable existing skipEmptyAddresses flag on calcAndAddTax
3) use skipEmptyAddresses flag in calcAndAddTax
Result:
item1 $200
Promo -$20 (changed promotion to -10%)
Tax 20%: $36.00
{color:#14892c}*Tax adj: -$4*{color}
--> $ 216.00
Right know the person working on the order has to manually calulate the order tax and add/subtract it from the initial calculated value. So when updating an order the values have to be checked manually as the promotion is recalculated and may have changed - but the tax is not.
The proposal is to recalculate the automatic calculated tax values when the order was created. Adding additional tax can still be done by adding a tax value manually.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)