svn commit: r494270 - in /ofbiz/trunk/applications/product: data/ProductTypeData.xml script/org/ofbiz/shipment/issuance/IssuanceServices.xml

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

svn commit: r494270 - in /ofbiz/trunk/applications/product: data/ProductTypeData.xml script/org/ofbiz/shipment/issuance/IssuanceServices.xml

sichen
Author: sichen
Date: Mon Jan  8 16:07:10 2007
New Revision: 494270

URL: http://svn.apache.org/viewvc?view=rev&rev=494270
Log:
OFBIZ-591:  Fix bug where shipped serialized inventory items were not decreasing the QoH.

Modified:
    ofbiz/trunk/applications/product/data/ProductTypeData.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml

Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?view=diff&rev=494270&r1=494269&r2=494270
==============================================================================
--- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Mon Jan  8 16:07:10 2007
@@ -422,7 +422,6 @@
     <StatusValidChange condition="" statusId="INV_PROMISED" statusIdTo="INV_DEFECTIVE" transitionName="Mark As Defective"/>
     <StatusValidChange condition="" statusId="INV_PROMISED" statusIdTo="INV_BEING_TRANS_PRM" transitionName="Being Transfered (Promised)"/>
     <StatusValidChange condition="" statusId="INV_BEING_TRANS_PRM" statusIdTo="INV_PROMISED" transitionName="Transfer Complete (Promised)"/>
-    <StatusValidChange condition="" statusId="INV_DELIVERED" statusIdTo="INV_AVAILABLE" transitionName="Return Available"/>
     <StatusValidChange condition="" statusId="INV_DELIVERED" statusIdTo="INV_RETURNED" transitionName="Return Status Pending"/>
     <StatusValidChange condition="" statusId="INV_RETURNED" statusIdTo="INV_AVAILABLE" transitionName="Make Return Available"/>
     <StatusValidChange condition="" statusId="INV_RETURNED" statusIdTo="INV_DEFECTIVE" transitionName="Mark Return Defective"/>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?view=diff&rev=494270&r1=494269&r2=494270
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Mon Jan  8 16:07:10 2007
@@ -34,6 +34,16 @@
         <now-timestamp-to-env env-name="newEntity.issuedDateTime"/>
 
         <create-value value-name="newEntity"/>
+
+        <!-- if the InventoryItem issued is serialized, then change its status to DELIVERED -->
+        <get-related-one value-name="newEntity" relation-name="InventoryItem" to-value-name="inventoryItem"/>
+        <if-not-empty field-name="inventoryItem">
+            <if-compare field-name="inventoryItemTypeId" map-name="inventoryItem" operator="equals" value="SERIALIZED_INV_ITEM">
+                <set field="updateContext.inventoryItemId" from-field="inventoryItem.inventoryItemId"/>
+                <set field="updateContext.statusId" value="INV_DELIVERED"/>
+                <call-service service-name="updateInventoryItem" in-map-name="updateContext"/>
+            </if-compare>
+        </if-not-empty>
     </simple-method>
     <simple-method method-name="updateItemIssuance" short-description="Update ItemIssuance">
         <check-permission permission="FACILITY" action="_UPDATE">