svn commit: r565652 - /ofbiz/trunk/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: r565652 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

jonesde
Author: jonesde
Date: Tue Aug 14 01:10:49 2007
New Revision: 565652

URL: http://svn.apache.org/viewvc?view=rev&rev=565652
Log:
Fixed issue with setting status to accepted and setting the paymentMethodId in the same call; also other small cleanups

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?view=diff&rev=565652&r1=565651&r2=565652
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml Tue Aug 14 01:10:49 2007
@@ -109,16 +109,17 @@
         <check-permission permission="ORDERMGR" action="_UPDATE"><fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunUpdateReturnHeader"/></check-permission>
         <check-errors/>
 
-        <set from-field="parameters.returnId" field="lookupPKMap.returnId"/>
-        <find-by-primary-key entity-name="ReturnHeader" map-name="lookupPKMap" value-name="returnHeader"/>
+        <entity-one entity-name="ReturnHeader" value-name="returnHeader"/>
 
         <!-- test the total return amount vs the total order amount -->
         <if-compare field-name="parameters.statusId" value="RETURN_ACCEPTED" operator="equals">
             <!-- get the list of ReturnItems.  Note: return may be assosicated with many different orders -->
             <entity-condition entity-name="ReturnItem" list-name="returnItems" distinct="true">
-                <condition-expr field-name="returnId" operator="equals" env-name="returnHeader.returnId"/>
+                <condition-expr field-name="returnId" env-name="returnHeader.returnId"/>
             </entity-condition>
+            
             <!-- this block is for debugging and can be removed later -->
+            <!--
             <log level="verbose" message="Items and adjustments for return ${returnHeader.returnId}"/>
             <entity-condition entity-name="ReturnAdjustment" list-name="returnAdjustments" distinct="true">
                 <condition-expr field-name="returnId" operator="equals" env-name="returnHeader.returnId"/>
@@ -129,7 +130,8 @@
             <iterate entry-name="returnAdjustment" list-name="returnAdjustments">
                 <log level="verbose" message="adjustment: ${returnAdjustment.returnItemSeqId} ${returnAdjustment.returnAdjustmentTypeId} [${returnAdjustment.description}] ${returnAdjustment.amount}"/>
             </iterate>
-            <!-- debugging block -->
+            -->
+            <!-- end debugging block -->
 
             <!-- this is used to make sure we don't return a negative amount -->
             <calculate field-name="returnTotalAmount"><number value="0.0"/></calculate>
@@ -141,6 +143,7 @@
                   <condition>
                       <and>
                           <if-empty field-name="returnHeader.paymentMethodId"/>
+                          <if-empty field-name="parameters.paymentMethodId"/><!-- because we haven't done the set-nonpk-fields yet, check this too -->
                           <or>
                               <if-compare field-name="returnItem.returnTypeId" operator="equals" value="RTN_CSREPLACE"/>
                               <if-compare field-name="returnItem.returnTypeId" operator="equals" value="RTN_REPAIR_REPLACE"/>