Author: ashish
Date: Tue Nov 24 06:36:39 2009 New Revision: 883604 URL: http://svn.apache.org/viewvc?rev=883604&view=rev Log: Applied fix from trunk revision: 883348 Applied patch from jira issue OFBIZ-2619 - Issues with Receive PO functionality. -- updated patch with use of variable name modifiers in UEL arithmetic, as suggested by Adrian. Thanks Mridul for the contribution. Modified: ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Modified: ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=883604&r1=883603&r2=883604&view=diff ============================================================================== --- ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) +++ ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Tue Nov 24 06:36:39 2009 @@ -318,7 +318,7 @@ </entity-and> <if-not-empty field="itemIssuances"> <first-from-list entry="itemIssuance" list="itemIssuances"/> - <set field="itemIssuance.quantity" value="${itemIssuance.quantity + parameters.quantity}" type="BigDecimal"/> + <set field="itemIssuance.quantity" value="${itemIssuance.quantity$bigDecimal + parameters.quantity$bigDecimal}" type="BigDecimal"/> <store-value value-field="itemIssuance"/> <set field="itemIssuanceId" from-field="itemIssuance.itemIssuanceId"/> <field-to-result field="itemIssuanceId"/> @@ -589,7 +589,7 @@ <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> </entity-and> <iterate entry="itemIssuance" list="allItemIssuances"> - <set field="totalIssuedQuantity" value="${totalIssuedQuantity + itemIssuance.quantity}" type="BigDecimal"/> + <set field="totalIssuedQuantity" value="${totalIssuedQuantity$bigDecimal + itemIssuance.quantity$bigDecimal}" type="BigDecimal"/> </iterate> </simple-method> </simple-methods> Modified: ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=883604&r1=883603&r2=883604&view=diff ============================================================================== --- ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) +++ ofbiz/branches/release09.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Tue Nov 24 06:36:39 2009 @@ -374,10 +374,10 @@ <else> <call-simple-method method-name="getTotalIssuedQuantityForOrderItem" xml-resource="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml"/> <call-simple-method method-name="getReceivedQuantityForOrderItem"/> - <set field="receivedQuantity" value="${receivedQuantity + parameters.quantity}" type="BigDecimal"/> + <set field="receivedQuantity" value="${receivedQuantity$bigDecimal + parameters.quantity$bigDecimal}" type="BigDecimal"/> <if-compare-field field="totalIssuedQuantity" operator="less" to-field="receivedQuantity" type="BigDecimal"> - <set field="quantityToAdd" value="${receivedQuantity - totalIssuedQuantity}" type="BigDecimal"/> - <set field="shipmentItem.quantity" value="${shipmentItem.quantity + quantityToAdd}" type="BigDecimal"/> + <set field="quantityToAdd" value="${receivedQuantity$bigDecimal - totalIssuedQuantity$bigDecimal}" type="BigDecimal"/> + <set field="shipmentItem.quantity" value="${shipmentItem.quantity$bigDecimal + quantityToAdd$bigDecimal}" type="BigDecimal"/> <store-value value-field="shipmentItem"/> <set field="shipmentItemSeqId" from-field="shipmentItem.shipmentItemSeqId"/> @@ -390,7 +390,7 @@ <order-by field-name="-issuedDateTime"/> </entity-and> <first-from-list entry="itemIssuance" list="itemIssuances"/> - <set field="itemIssuance.quantity" value="${itemIssuance.quantity + quantityToAdd}" type="BigDecimal"/> + <set field="itemIssuance.quantity" value="${itemIssuance.quantity$bigDecimal + quantityToAdd$bigDecimal}" type="BigDecimal"/> <store-value value-field="itemIssuance"/> <set field="itemIssuanceId" from-field="itemIssuance.itemIssuanceId"/> </if-compare-field> @@ -414,7 +414,7 @@ <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> </entity-and> <iterate entry="shipmentReceipt" list="shipmentReceipts"> - <set field="receivedQuantity" value="${receivedQuantity + shipmentReceipt.quantityAccepted}" type="BigDecimal"/> + <set field="receivedQuantity" value="${receivedQuantity$bigDecimal + shipmentReceipt.quantityAccepted$bigDecimal}" type="BigDecimal"/> </iterate> </simple-method> @@ -434,7 +434,7 @@ <if-not-empty field="orderItem.productId"> <call-simple-method method-name="getTotalIssuedQuantityForOrderItem" xml-resource="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml"/> <if-compare-field field="totalIssuedQuantity" operator="less" to-field="receivedQuantity" type="BigDecimal"> - <set field="quantityToAdd" value="${receivedQuantity - totalIssuedQuantity}" type="BigDecimal"/> + <set field="quantityToAdd" value="${receivedQuantity$bigDecimal - totalIssuedQuantity$bigDecimal}" type="BigDecimal"/> <entity-condition entity-name="ShipmentItem" list="shipmentItems"> <condition-list combine="and"> <condition-expr field-name="productId" from-field="orderItem.productId"/> @@ -444,7 +444,7 @@ <order-by field-name="shipmentItemSeqId"/> </entity-condition> <first-from-list entry="shipmentItem" list="shipmentItems"/> - <set field="shipmentItem.quantity" value="${shipmentItem.quantity + quantityToAdd}" type="BigDecimal"/> + <set field="shipmentItem.quantity" value="${shipmentItem.quantity$bigDecimal + quantityToAdd$bigDecimal}" type="BigDecimal"/> <store-value value-field="shipmentItem"/> <entity-and list="itemIssuances" entity-name="ItemIssuance"> @@ -455,7 +455,7 @@ <order-by field-name="-issuedDateTime"/> </entity-and> <first-from-list entry="itemIssuance" list="itemIssuances"/> - <set field="itemIssuance.quantity" value="${itemIssuance.quantity + quantityToAdd}" type="BigDecimal"/> + <set field="itemIssuance.quantity" value="${itemIssuance.quantity$bigDecimal + quantityToAdd$bigDecimal}" type="BigDecimal"/> <store-value value-field="itemIssuance"/> <set field="itemIssuanceId" from-field="itemIssuance.itemIssuanceId"/> |
Free forum by Nabble | Edit this page |