Author: ashish Date: Sat Feb 21 13:01:30 2015 New Revision: 1661351 URL: http://svn.apache.org/r1661351 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/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Modified: ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1661351&r1=1661350&r2=1661351&view=diff ============================================================================== --- ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) +++ ofbiz/branches/release14.12/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Sat Feb 21 13:01:30 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">