This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new bcbb8be970 Fixed: Wrong OrderAdjustments (because of tax) when
cancelling an Order (OFBIZ-9205) (#1290)
bcbb8be970 is described below
commit bcbb8be970168284716969b702e56f36613ffb62
Author: Mridul Pathak <[email protected]>
AuthorDate: Fri May 29 15:36:14 2026 +0530
Fixed: Wrong OrderAdjustments (because of tax) when cancelling an Order
(OFBIZ-9205) (#1290)
Fixed: Wrong OrderAdjustments (because of tax) when cancelling an Order
(OFBIZ-9205)
During order cancellation, OrderReadHelper.calcOrderPromoAdjustmentsBd
double-counted item-level promotions in the tax recalculation because it
was aggregating both order-level and item-level adjustments.
Pre-filtered the promotions list in calcOrderPromoAdjustmentsBd to
strictly aggregate only order-level (header-level) promotions.
Thanks: Maurice Meyer for reporting the issue.
---
.../src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
index 27d66e4613..94754511a6 100644
---
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
+++
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java
@@ -3246,6 +3246,7 @@ public class OrderReadHelper {
List<GenericValue> promoAdjustments =
EntityUtil.filterByAnd(allOrderAdjustments,
UtilMisc.toMap("orderAdjustmentTypeId",
"PROMOTION_ADJUSTMENT"));
+ promoAdjustments = getOrderHeaderAdjustments(promoAdjustments, null);
if (UtilValidate.isNotEmpty(promoAdjustments)) {
Iterator<GenericValue> promoAdjIter = promoAdjustments.iterator();