Author: ashish
Date: Mon Aug 18 10:10:57 2014
New Revision: 1618569

URL: http://svn.apache.org/r1618569
Log:
Based on Adrian's recent comment, committing the changes from 
OrderReturnServices.xml file. Thanks ofbiz.us team for providing updated patch. 

==============================================================
Please do not use the <calculate> element. Mini-language supports UEL:

<set field="totalsMap[receipt.returnItemSeqId]" from="receipt.quantityAccepted 
+ receipt.quantityRejected />

Also, the <set> element "from-field" attribute has been deprecated, use "from".

Mini-language has an updated schema, it would be best if you configured your 
XML editor to use it.
==============================================================

Modified:
    
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

Modified: 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?rev=1618569&r1=1618568&r2=1618569&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
 (original)
+++ 
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
 Mon Aug 18 10:10:57 2014
@@ -535,19 +535,14 @@ under the License.
             <if-empty field="totalsMap[receipt.returnItemSeqId]">
                 <set field="totalsMap[receipt.returnItemSeqId]" value="0" 
type="BigDecimal"/>
             </if-empty>
-            <calculate field="totalsMap[receipt.returnItemSeqId]">
-                <calcop field="totalsMap[receipt.returnItemSeqId]" 
operator="add">
-                    <calcop field="receipt.quantityAccepted" operator="get"/>
-                    <calcop field="receipt.quantityRejected" operator="get"/>
-                </calcop>
-            </calculate>
+            <set field="totalsMap[receipt.returnItemSeqId]" 
from="totalsMap[receipt.returnItemSeqId] + (receipt.quantityAccepted + 
receipt.quantityRejected)"/>
         </iterate>
         <get-related relation-name="ReturnItem" list="returnItems" 
value-field="returnHeader"/>
         <iterate-map key="returnItemSeqId" value="value" map="totalsMap">
-            <set field="filterMap.returnItemSeqId" 
from-field="returnItemSeqId"/>
+            <set field="filterMap.returnItemSeqId" from="returnItemSeqId"/>
             <filter-list-by-and list="returnItems" map="filterMap" 
to-list="items"/>
             <first-from-list entry="item" list="items"/>
-            <set field="item.receivedQuantity" from-field="value" 
type="BigDecimal"/>
+            <set field="item.receivedQuantity" from="value" type="BigDecimal"/>
             <set-service-fields service-name="updateReturnItem" map="item" 
to-map="serviceInMap"/>
             <if-compare-field field="value" to-field="item.returnQuantity" 
operator="greater-equals" type="BigDecimal">
                 <!-- update the status for the item -->


Reply via email to