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:11:24 UTC

svn commit: r1609408 - in /ofbiz/branches/release12.04: ./ applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml

Author: jacopoc
Date: Thu Jul 10 07:11:24 2014
New Revision: 1609408

URL: http://svn.apache.org/r1609408
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/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/inventory/StockMoveServices.xml

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1609406

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