svn commit: r949099 - /ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

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

svn commit: r949099 - /ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

mor-2
Author: mor
Date: Fri May 28 05:33:16 2010
New Revision: 949099

URL: http://svn.apache.org/viewvc?rev=949099&view=rev
Log:
Migrated the fix from trunk r949097 (originally committed in r948414)

An alternative fix to the status of non-serialized inventory item when a return is received. This also fix an issue when a
defective inventory item is reserved against a non-serialized inventory while placing a sales order.

Bug reported by Ratnesh Upadhyay.

Modified:
    ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml

Modified: ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=949099&r1=949098&r2=949099&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/branches/release10.04/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Fri May 28 05:33:16 2010
@@ -96,6 +96,30 @@ under the License.
         <!-- before getting going, see if there are any validation issues so far -->
         <check-errors/>
 
+        <!-- Status for Non serialized and Serialized inventory are different, lets make sure correct status is stored in database -->
+        <if-compare field="parameters.inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM">
+            <if-compare field="parameters.statusId" operator="equals" value="INV_DEFECTIVE"><!-- This status may come from the Receive Return Screen -->
+                <set field="parameters.statusId" value="INV_NS_DEFECTIVE"/>
+            <else>
+                <if-compare field="parameters.statusId" operator="equals" value="INV_ON_HOLD">
+                    <set field="parameters.statusId" value="INV_NS_ON_HOLD"/>
+                </if-compare>
+            </else>
+            </if-compare>
+            <!-- Any other status should be just set to null, if it is not a valid status for Non Serialized inventory -->
+            <if>
+                <condition>
+                    <and>
+                        <not><if-compare field="parameters.statusId" operator="equals" value="INV_NS_DEFECTIVE"/></not>
+                        <not><if-compare field="parameters.statusId" operator="equals" value="INV_NS_ON_HOLD"/></not>
+                    </and>
+                </condition>
+                <then>
+                    <set field="parameters.statusId" from-field="nullField"/>
+                </then>
+            </if>
+        </if-compare>
+
         <loop count="${loops}" field="currentLoop">
             <log level="info" message="receiveInventoryProduct Looping and creating inventory info - ${currentLoop}"/>