svn commit: r424068 - in /incubator/ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml

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

svn commit: r424068 - in /incubator/ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml

jacopoc
Author: jacopoc
Date: Thu Jul 20 14:11:16 2006
New Revision: 424068

URL: http://svn.apache.org/viewvc?rev=424068&view=rev
Log:
Added support for order item cancellation for marketing packages.

Modified:
    incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
    incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml

Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?rev=424068&r1=424067&r2=424068&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Thu Jul 20 14:11:16 2006
@@ -248,8 +248,8 @@
             <condition>
                 <and>
                     <if-compare field-name="inventoryItem.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/>
-                    <not><if-empty field-name="inventoryItem.quantityOnHandTotal"/></not>
-                    <if-compare field-name="inventoryItem.quantityOnHandTotal" operator="greater" value="0" type="Double"/>
+                    <not><if-empty field-name="inventoryItem.availableToPromiseTotal"/></not>
+                    <if-compare field-name="inventoryItem.availableToPromiseTotal" operator="greater" value="0" type="Double"/>
                 </and>
             </condition>
             <then>
@@ -257,11 +257,11 @@
                     <condition>
                         <or>
                             <if-empty field-name="parameters.quantity"/>
-                            <if-compare-field field-name="parameters.quantity" operator="greater" to-field-name="inventoryItem.quantityOnHandTotal" type="Double"/>
+                            <if-compare-field field-name="parameters.quantity" operator="greater" to-field-name="inventoryItem.availableToPromiseTotal" type="Double"/>
                         </or>
                     </condition>
                     <then>
-                        <set from-field="inventoryItem.quantityOnHandTotal" field="deductAmount"/>
+                        <set from-field="inventoryItem.availableToPromiseTotal" field="deductAmount"/>
                     </then>
                     <else>
                         <set from-field="parameters.quantity" field="deductAmount"/>

Modified: incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=424068&r1=424067&r2=424068&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original)
+++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Thu Jul 20 14:11:16 2006
@@ -358,6 +358,9 @@
             <set from-field="oisgir.shipGroupSeqId" field="cancelOisgirMap.shipGroupSeqId"/>
             <set from-field="oisgir.inventoryItemId" field="cancelOisgirMap.inventoryItemId"/>
             <call-service service-name="cancelOrderItemShipGrpInvRes" in-map-name="cancelOisgirMap"/>
+            <!-- checkDecomposeInventoryItem service is called to decompose a marketing package (if the product is a mkt pkg) -->
+            <set from-field="oisgir.inventoryItemId" field="checkDiiMap.inventoryItemId"/>
+            <call-service service-name="checkDecomposeInventoryItem" in-map-name="checkDiiMap"/>
         </iterate>
     </simple-method>
     <simple-method method-name="cancelOrderItemInvResQty" short-description="Cancel Inventory Reservation Qty For An Item">
@@ -392,6 +395,9 @@
                     <set from-field="oisgir.shipGroupSeqId" field="cancelOisgirMap.shipGroupSeqId"/>
                     <set from-field="oisgir.inventoryItemId" field="cancelOisgirMap.inventoryItemId"/>
                     <call-service service-name="cancelOrderItemShipGrpInvRes" in-map-name="cancelOisgirMap"/>
+                    <!-- checkDecomposeInventoryItem service is called to decompose a marketing package (if the product is a mkt pkg) -->
+                    <set from-field="oisgir.inventoryItemId" field="checkDiiMap.inventoryItemId"/>
+                    <call-service service-name="checkDecomposeInventoryItem" in-map-name="checkDiiMap"/>
                     <!-- update the toCancelAmount -->
                     <calculate field-name="toCancelAmount">
                         <calcop operator="subtract" field-name="toCancelAmount">