You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2015/02/21 14:02:52 UTC
svn commit: r1661353 -
/ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
Author: ashish
Date: Sat Feb 21 13:02:52 2015
New Revision: 1661353
URL: http://svn.apache.org/r1661353
Log:
Applied bug fix from trunk r1661350.
========================================================================
Applied patch from jira issue - OFBIZ-5373 - If received quantity is greater then ordered quantity then order item quantity update but order item shipgroup assoc quantity does not updated.
Thanks Deepak for creating the issue, Thanks Rishi for providing the patch. Thanks Arun for the verification.
========================================================================
Modified:
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
Modified: ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1661353&r1=1661352&r2=1661353&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/branches/release13.07/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Sat Feb 21 13:02:52 2015
@@ -467,7 +467,26 @@ under the License.
</if-not-empty>
<call-simple-method method-name="getReceivedQuantityForOrderItem"/>
<if-compare-field field="orderItem.quantity" operator="less" to-field="receivedQuantity" type="BigDecimal">
+ <entity-and list="orderItemShipGroupAssocs" entity-name="OrderItemShipGroupAssoc">
+ <field-map field-name="orderId" from-field="orderItem.orderId"/>
+ <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/>
+ </entity-and>
+ <calculate field="quantityVariance" type="BigDecimal" decimal-scale="2" rounding-mode="HalfUp">
+ <calcop operator="subtract">
+ <calcop operator="get" field="receivedQuantity"/>
+ <calcop operator="get" field="orderItem.quantity"/>
+ </calcop>
+ </calculate>
+ <first-from-list entry="orderItemShipGroupAssoc" list="orderItemShipGroupAssocs"/>
+ <calculate field="oisgaQuantity" type="BigDecimal" decimal-scale="2" rounding-mode="HalfUp">
+ <calcop operator="add">
+ <calcop operator="get" field="orderItemShipGroupAssoc.quantity"/>
+ <calcop operator="get" field="quantityVariance"/>
+ </calcop>
+ </calculate>
+ <set field="orderItemShipGroupAssoc.quantity" from-field="oisgaQuantity"/>
<set field="orderItem.quantity" from-field="receivedQuantity"/>
+ <store-value value-field="orderItemShipGroupAssoc"/>
<store-value value-field="orderItem"/>
</if-compare-field>
<if-not-empty field="parameters.shipmentId">