You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2009/05/21 17:27:20 UTC

svn commit: r777154 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml

Author: jacopoc
Date: Thu May 21 15:27:20 2009
New Revision: 777154

URL: http://svn.apache.org/viewvc?rev=777154&view=rev
Log:
some changes to the addProductsBackToCategory service because with the existing code it was no more possible to receive into the facility a product not associated to any category

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=777154&r1=777153&r2=777154&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 Thu May 21 15:27:20 2009
@@ -1061,7 +1061,7 @@
         </if>
     </simple-method>
     
-    <simple-method method-name="addProductsBackToCategory" short-description="When one or more product is received directly through receive inventory or refund return then add these product(s) back to category, if they does not have any active category">
+    <simple-method method-name="addProductsBackToCategory" short-description="When one or more product is received directly through receive inventory or refund return then add these product(s) back to category, if they do not have any active category">
         <if-not-empty field="parameters.inventoryItemId">
             <entity-one entity-name="InventoryItem" value-field="inventoryItem"/>
             <entity-and entity-name="ProductCategoryMember" list="productCategoryMembers">
@@ -1071,9 +1071,11 @@
             <filter-list-by-date list="productCategoryMembers" to-list="pcms"/>
             <if-empty field="pcms">
                 <first-from-list list="productCategoryMembers" entry="pcm"/>
-                <clear-field field="pcm.thruDate"/>
-                <set-service-fields service-name="updateProductToCategory" map="pcm" to-map="updateProductToCategoryMap"/>
-                <call-service service-name="updateProductToCategory" in-map-name="updateProductToCategoryMap"/>
+                <if-not-empty field="pcm">
+                    <clear-field field="pcm.thruDate"/>
+                    <set-service-fields service-name="updateProductToCategory" map="pcm" to-map="updateProductToCategoryMap"/>
+                    <call-service service-name="updateProductToCategory" in-map-name="updateProductToCategoryMap"/>
+                </if-not-empty>
             </if-empty>
         <else>
             <if-not-empty field="parameters.returnId">
@@ -1090,14 +1092,16 @@
                         <filter-list-by-date list="productCategoryMembers" to-list="pcms"/>
                         <if-empty field="pcms">
                             <first-from-list list="productCategoryMembers" entry="pcm"/>
-                            <clear-field field="pcm.thruDate"/>
-                            <set-service-fields service-name="updateProductToCategory" map="pcm" to-map="updateProductToCategoryMap"/>
-                            <call-service service-name="updateProductToCategory" in-map-name="updateProductToCategoryMap"/>
+                            <if-not-empty field="pcm">
+                                <clear-field field="pcm.thruDate"/>
+                                <set-service-fields service-name="updateProductToCategory" map="pcm" to-map="updateProductToCategoryMap"/>
+                                <call-service service-name="updateProductToCategory" in-map-name="updateProductToCategoryMap"/>
+                            </if-not-empty>
                         </if-empty>
                     </iterate>
                 </if-not-empty>
-            </if-not-empty>       
-        </else>    
+            </if-not-empty>
+        </else>
         </if-not-empty>
-    </simple-method>    
+    </simple-method> 
 </simple-methods>
\ No newline at end of file