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 2014/07/10 09:10:42 UTC

svn commit: r1609406 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml

Author: jacopoc
Date: Thu Jul 10 07:10:42 2014
New Revision: 1609406

URL: http://svn.apache.org/r1609406
Log:
Fixed bug reported by Christian Carlow in OFBIZ-5599: Facility Pick Stock Moves "Cannot compare: r-value is null" error when ProductFacilityLocation.minimumStock is not set.

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml?rev=1609406&r1=1609405&r2=1609406&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml Thu Jul 10 07:10:42 2014
@@ -225,6 +225,7 @@ under the License.
 
         <iterate entry="productFacilityLocationQuantityTest" list="productFacilityLocationQuantityTestList">
             <!-- TODO: this comparison could be done by the database and be more efficient, but since we don't have field to field comparisons in the entity engine or EntityCondition operations in simple-methods, some work needs to be done before that can happen -->
+            <set field="minimumStock" from-field="productFacilityLocationQuantityTest.minimumStock" default-value="0" type="BigDecimal"/>
             <if>
                 <condition>
                     <and>
@@ -233,12 +234,11 @@ under the License.
                         <or>
                             <and>
                                 <if-empty field="productFacilityLocationQuantityTest.availableToPromiseTotal"/>
-                                <not><if-empty field="productFacilityLocationQuantityTest.minimumStock"/></not>
-                                <if-compare field="productFacilityLocationQuantityTest.minimumStock" operator="greater" value="0" type="BigDecimal"></if-compare>
+                                <if-compare field="minimumStock" operator="greater" value="0" type="BigDecimal"></if-compare>
                             </and>
                             <and>
                                 <not><if-empty field="productFacilityLocationQuantityTest.availableToPromiseTotal"/></not>
-                                <if-compare-field field="productFacilityLocationQuantityTest.availableToPromiseTotal" to-field="productFacilityLocationQuantityTest.minimumStock" operator="less" type="BigDecimal"/>
+                                <if-compare-field field="productFacilityLocationQuantityTest.availableToPromiseTotal" to-field="minimumStock" operator="less" type="BigDecimal"/>
                             </and>
                         </or>
                     </and>