Author: jacopoc
Date: Wed Dec 12 00:04:41 2007
New Revision: 603506
URL:
http://svn.apache.org/viewvc?rev=603506&view=revLog:
This is a very temporary fix for an issue probably introduced in rev. 568816: when more than one *non* serialized inventory is received from a shipment (for example two different product ids) then only one inventory item is created for the first product and then updated for the second (overriding the product id in the first item).
This is caused by the way the parameters.inventoryItemId is set and used inside this service.
I need help to provide a better fix because I don't understand completely the scope of the changes introduced in rev. 568816.
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=603506&r1=603505&r2=603506&view=diff==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Wed Dec 12 00:04:41 2007
@@ -107,24 +107,26 @@
<!-- before getting going, see if there are any validation issues so far -->
<check-errors/>
-
+
<loop count="${loops}" field="currentLoop">
<log level="info" message="receiveInventoryProduct Looping and creating inventory info - ${currentLoop}"/>
<!-- if there is an inventoryItemId, update it (this will happen when receiving serialized inventory already in the system, like for returns); if not create one -->
<clear-field field-name="serviceInMap"/>
+<!--
<if-empty field-name="parameters.inventoryItemId">
+-->
<set-service-fields service-name="createInventoryItem" map-name="parameters" to-map-name="serviceInMap"/>
<call-service service-name="createInventoryItem" in-map-name="serviceInMap">
<result-to-field result-name="inventoryItemId" field-name="parameters.inventoryItemId"/>
</call-service>
-
+<!--
<else>
<set-service-fields service-name="updateInventoryItem" map-name="parameters" to-map-name="serviceInMap"/>
<call-service service-name="updateInventoryItem" in-map-name="serviceInMap"/>
</else>
</if-empty>
-
+-->
<!-- do this only for non-serialized inventory -->
<if-compare value="SERIALIZED_INV_ITEM" operator="not-equals" field-name="parameters.inventoryItemTypeId">
<clear-field field-name="serviceInMap"/>