Praveen Agrawal created OFBIZ-5411:
--------------------------------------
Summary: Checking with orderAdjustment.productPromoId rather than
adjustment.productPromoId
Key: OFBIZ-5411
URL: https://issues.apache.org/jira/browse/OFBIZ-5411
Project: OFBiz
Issue Type: Bug
Affects Versions: Release Branch 11.04
Reporter: Praveen Agrawal
“recreateOrderAdjustments” method inside OrderServices.xml (Line 659):-
<call-object-method obj-field="cart" method-name="makeAllAdjustments"
ret-field="adjustments"/>
<!-- Accumulate the new promotion total from the recalculated promotion
adjustments -->
<set field="newOrderAdjustmentTotal" value="0" type="BigDecimal"/>
<iterate list="adjustments" entry="adjustment">
<if>
<condition>
<not><if-empty
field="orderAdjustment.productPromoId"/></not>
</condition>
<then>
<calculate field="newOrderAdjustmentTotal"
decimal-scale="3">
<calcop operator="add">
<calcop operator="get" field="adjustment.amount"/>
<calcop operator="get"
field="newOrderAdjustmentTotal"/>
</calcop>
</calculate>
</then>
</if>
</iterate>
While iterating the adjustments list we are checking with
orderAdjustment.productPromoId rather then the adjustment.productPromoId. Using
orderAdjustment.productPromoId the condition will never true and the
newOrderAdjustmentTotal will always be 0.
The issue is also exists in Release Branch 10.04. But i didn't found the 10.04
in Version List.
--
This message was sent by Atlassian JIRA
(v6.1#6144)