Improved: Check for QOH while doing reservations. Change the codition to check ATP instead of QOH. As ATP will be always lesser than QOH, will improved performance with no impact on the reservation logic.
Thanks to Suraj Khurana for reporting the issue and providing fix.
@@ -87,7 +87,7 @@ under the License.
<condition-expr field-name="facilityId" from-field="parameters.facilityId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="lotId" from-field="parameters.lotId" ignore-if-empty="true" ignore-if-null="true"/>
- <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/>
+ <condition-expr field-name="availableToPromiseTotal" operator="greater" value="0.0"/>
<condition-expr field-name="locationTypeEnumId" operator="equals" value="FLT_PICKLOC"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/>
@@ -110,7 +110,7 @@ under the License.
<condition-expr field-name="facilityId" from-field="parameters.facilityId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="lotId" from-field="parameters.lotId" ignore-if-empty="true" ignore-if-null="true"/>
- <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/>
+ <condition-expr field-name="availableToPromiseTotal" operator="greater" value="0.0"/>
<condition-expr field-name="locationTypeEnumId" operator="equals" value="FLT_BULK"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/>
@@ -134,7 +134,7 @@ under the License.
<condition-expr field-name="facilityId" from-field="parameters.facilityId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="containerId" from-field="parameters.containerId" ignore-if-empty="true" ignore-if-null="true"/>
<condition-expr field-name="lotId" from-field="parameters.lotId" ignore-if-empty="true" ignore-if-null="true"/>
- <condition-expr field-name="quantityOnHandTotal" operator="greater" value="0.0"/>
+ <condition-expr field-name="availableToPromiseTotal" operator="greater" value="0.0"/>
<condition-expr field-name="locationSeqId" operator="equals" from-field="nullField"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_NS_DEFECTIVE"/>
<condition-expr field-name="statusId" operator="not-equals" value="INV_DEFECTIVE"/>
