Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
Applied fix from trunk for revision: 1609406
Browse files Browse the repository at this point in the history
===

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.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release11.04@1609409 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jacopoc committed Jul 10, 2014
1 parent b58c997 commit fa9015d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit fa9015d

Please sign in to comment.