svn commit: r539858 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r539858 - /ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

lektran
Author: lektran
Date: Sun May 20 03:26:12 2007
New Revision: 539858

URL: http://svn.apache.org/viewvc?view=rev&rev=539858
Log:
Applied fix from trunk for revision: 537119

Modified:
    ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

Modified: ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?view=diff&rev=539858&r1=539857&r2=539858
==============================================================================
--- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original)
+++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Sun May 20 03:26:12 2007
@@ -569,9 +569,15 @@
                     <condition-expr field-name="availableToPromiseTotal" operator="equals" value=""/>
                     <condition-expr field-name="availableToPromiseTotal" operator="less" value="0"/>
                 </condition-list>
+                <!-- Exclude the current item from the selection, because it will be added to the list anyway -->
+                <condition-expr field-name="inventoryItemId" operator="not-equals" env-name="inventoryItem.inventoryItemId"/>
             </condition-list>
             <!-- TODO: order the list of inventory items in a useful way, since operations occur below based on the first item -->
         </entity-condition>
+        <!-- the current item is added to the list, even if its atp is greater than zero, because there could be
+             negative reservations (backorders) on it, if the atp has been increased by an inventory variance -->
+        <field-to-list field-name="inventoryItem" list-name="inventoryItems"/>
+
         <!--  find their current reservations -->
         <iterate list-name="inventoryItems" entry-name="item">
             <!-- If quantityOnHandTotal is not equal to availableToPromiseTotal this means that