Author: jacopoc
Date: Thu Jul 10 07:11:17 2014
New Revision: 1609407

URL: http://svn.apache.org/r1609407
Log:
Applied fix from trunk for revision: 1609406 
===

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/branches/release13.07/   (props changed)
    
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1609406

Modified: 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml?rev=1609407&r1=1609406&r2=1609407&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml
 (original)
+++ 
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml
 Thu Jul 10 07:11:17 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>


Reply via email to