svn commit: r521005 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java

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

svn commit: r521005 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java

sichen
Author: sichen
Date: Wed Mar 21 14:41:07 2007
New Revision: 521005

URL: http://svn.apache.org/viewvc?view=rev&rev=521005
Log:
Fix bug in inventory xfer where completed transfers for serialized items were not being set to AVAILABLE status.

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?view=diff&rev=521005&r1=521004&r2=521005
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Wed Mar 21 14:41:07 2007
@@ -232,8 +232,6 @@
             } catch (GenericEntityException e) {
                 return ServiceUtil.returnError("Inventory refresh problem [" + e.getMessage() + "]");
             }
-        } else if (inventoryType.equals("SERIALIZED_INV_ITEM")) {
-            inventoryItem.set("statusId", "INV_AVAILABLE");
         }
 
         // set the fields on the item
@@ -242,6 +240,12 @@
                                                     "containerId", inventoryTransfer.get("containerIdTo"),
                                                     "locationSeqId", inventoryTransfer.get("locationSeqIdTo"),
                                                     "userLogin", userLogin);
+
+        // for serialized items, automatically make them available
+        if (inventoryType.equals("SERIALIZED_INV_ITEM")) {
+            updateInventoryItemMap.put("statusId", "INV_AVAILABLE");
+        }
+
         // if the destination facility's owner is different
         // from the inventory item's ownwer,
         // the inventory item is assigned to the new owner.