svn commit: r538743 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

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

svn commit: r538743 - /ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml

sichen
Author: sichen
Date: Wed May 16 14:23:57 2007
New Revision: 538743

URL: http://svn.apache.org/viewvc?view=rev&rev=538743
Log:
Fix a potential problem with null productfacility records when creating requirements

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

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?view=diff&rev=538743&r1=538742&r2=538743
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Wed May 16 14:23:57 2007
@@ -315,7 +315,8 @@
         <if-compare field-name="requirementMethodId" operator="equals" value="PRODRQM_ATP">
             <!-- get the ATP, QOH quantities and the product facility's minimum stock -->
             <call-simple-method method-name="getProductFacilityAndQuantities"/>
-            
+
+            <if-not-empty field-name="productFacility">
             <!-- are we below minimum stock?  this service is supposed to be called after inventory is reserved, so inventory should have been updated already -->
             <if-compare-field field-name="availableToPromiseTotal" to-field-name="productFacility.minimumStock" operator="less" type="Double">
                 <!-- what is the right quantity?  It is the lesser of the actual quantity and the quantity required to bring us back up to minimum stock -->
@@ -338,6 +339,7 @@
                 <set from-field="inventoryItem.facilityId" field="inputMap.facilityId"/>
                 <call-simple-method method-name="createRequirementAndCommitment"/>
             </if-compare-field>
+            </if-not-empty>
         </if-compare>
     </simple-method>