This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new 01c7268b9a Fixed: Wrong OrderAdjustments (because of tax) when 
cancelling an Order (OFBIZ-9205) (#1291)
01c7268b9a is described below

commit 01c7268b9afb3ec641be95b33ec58fbc03642224
Author: Mridul Pathak <[email protected]>
AuthorDate: Fri May 29 15:36:30 2026 +0530

    Fixed: Wrong OrderAdjustments (because of tax) when cancelling an Order 
(OFBIZ-9205) (#1291)
    
    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 8549ec0fc9..897afe1217 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
@@ -3185,6 +3185,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();

Reply via email to