svn commit: r1065500 - /ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1065500 - /ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

mor-2
Author: mor
Date: Mon Jan 31 07:33:56 2011
New Revision: 1065500

URL: http://svn.apache.org/viewvc?rev=1065500&view=rev
Log:
Merged from trunk r1065497.
Log: Bug fix - While creating exchange order for returned refund item(s) in some cases system throw an error for duplicate entry for key. The additional check will prevent it.

Modified:
    ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

Modified: ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml?rev=1065500&r1=1065499&r2=1065500&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/branches/release10.04/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Mon Jan 31 07:33:56 2011
@@ -987,7 +987,11 @@ under the License.
                     <set field="orderItemAssocMap.orderItemAssocTypeId" value="EXCHANGE"/>
                     <make-value entity-name="OrderItemAssoc" value-field="orderItemAssoc"/>
                     <set-pk-fields map="orderItemAssocMap" value-field="orderItemAssoc"/>
+                    <find-by-primary-key entity-name="OrderItemAssoc" map="orderItemAssoc" value-field="orderItemAssocValue"/>
+                    <if-empty field="orderItemAssocValue">
                     <create-value value-field="orderItemAssoc"/>
+                    <clear-field field="orderItemAssoc"/>
+                    </if-empty>
                     <set field="returnItemCounter" value="${returnItemCounter+1}" type="Long"/>
                 </iterate>
             </then>
@@ -1023,8 +1027,11 @@ under the License.
                     <set field="orderItemAssocMap.orderItemAssocTypeId" value="EXCHANGE"/>
                     <make-value entity-name="OrderItemAssoc" value-field="orderItemAssoc"/>
                     <set-pk-fields map="orderItemAssocMap" value-field="orderItemAssoc"/>
+                    <find-by-primary-key entity-name="OrderItemAssoc" map="orderItemAssoc" value-field="orderItemAssocValue"/>
+                    <if-empty field="orderItemAssocValue">
                     <create-value value-field="orderItemAssoc"/>
                     <clear-field field="orderItemAssocMap"/>
+                    </if-empty>
                     <set field="orderItemCounter" value="${orderItemCounter+1}" type="Long"/>
                 </iterate>
             </else>