Author: jaz
Date: Thu Mar 10 17:25:47 2011
New Revision: 1080292
URL:
http://svn.apache.org/viewvc?rev=1080292&view=revLog:
no need to lookup the dest facility default inventory type for each item; now it uses the first lookup before the loop; also since the edit facility screen show non-serialized by default when the value is null; the default value is now set to non-serialized
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=1080292&r1=1080291&r2=1080292&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 Thu Mar 10 17:25:47 2011
@@ -245,7 +245,7 @@ under the License.
<!-- if no inventory item type specified, get default from facility -->
<if-empty field="parameters.inventoryItemTypeId">
<get-related-one value-field="returnHeader" relation-name="Facility" to-value-field="facility"/>
- <set from-field="facility.defaultInventoryItemTypeId" field="parameters.inventoryItemTypeId"/>
+ <set field="parameters.inventoryItemTypeId" from-field="facility.defaultInventoryItemTypeId" default-value="NON_SERIAL_INV_ITEM"/>
</if-empty>
<now-timestamp field="nowTimestamp"/>
@@ -286,10 +286,9 @@ under the License.
<condition-expr field-name="facilityId" operator="equals" from-field="returnHeader.destinationFacilityId"/>
<condition-expr field-name="inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM"/>
</condition-list>
- </entity-count>
- <get-related-one value-field="returnHeader" relation-name="Facility" to-value-field="destinationFacility"/>
+ </entity-count>
<set field="setNonSerial" value="false"/>
- <if-compare field="destinationFacility.defaultInventoryItemTypeId" value="NON_SERIAL_INV_ITEM" operator="equals">
+ <if-compare field="parameters.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM" operator="equals">
<if-compare field="serializedItemCount" value="0" operator="equals">
<set field="parameters.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
<set field="setNonSerial" value="true"/>