Author: apatel
Date: Thu Jun 28 14:21:49 2007 New Revision: 551703 URL: http://svn.apache.org/viewvc?view=rev&rev=551703 Log: Clean up and improvements to issue Serialized inventory method. Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?view=diff&rev=551703&r1=551702&r2=551703 ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Thu Jun 28 14:21:49 2007 @@ -1346,11 +1346,9 @@ </simple-method> <simple-method method-name="issueSerializedInvToShipmentPackageAndSetTracking" short-description=""> - <!-- In Parameters are - orderId, orderItemSeqId, shipGroupSeqId, inventoryItemId, originFacilityId, qtyShipped, trackingNum, serialNumber - If serialNumber is provide, Then compare it with the serialNumber of inventoryItem on reservation. If they don't match, - We'll have to reReserve specific inventory that is shiped. - --> + <!-- If serialNumber is provided, Then compare it with the serialNumber of inventoryItem on reservation. If they don't match, + We'll have to reReserve specific inventory that is shiped. --> + <make-value entity-name="OrderItemShipGrpInvRes" value-name="orderItemShipGrpInvResLookupPk"/> <set-pk-fields value-name="orderItemShipGrpInvResLookupPk" map-name="parameters"/> <find-by-primary-key entity-name="OrderItemShipGrpInvRes" map-name="orderItemShipGrpInvResLookupPk" value-name="orderItemShipGrpInvRes"/> @@ -1361,7 +1359,7 @@ <call-service service-name="reserveAnInventoryItem" in-map-name="reserveAnInventoryItemCtx"/> </if-compare-field> <!-- get InventoryItem issued to shipment --> - <log level="verbose" message="Item Map : ${itemMap}"/> + <log level="info" message="Item Map : ${itemMap}"/> <clear-field field-name="issueContext"/> <set from-field="parameters.shipmentId" field="issueContext.shipmentId"/> <set from-field="parameters.inventoryItemId" field="issueContext.inventoryItemId"/> @@ -1373,45 +1371,43 @@ <call-service service-name="issueOrderItemShipGrpInvResToShipment" in-map-name="issueContext"> <result-to-field result-name="itemIssuanceId" field-name="parameters.itemIssuanceId"/> </call-service> - <!-- place all issued items into a unique package per tracking num --> - <log level="info" message="QuickShipOrderByItem grouping by tracking number : ${parameters.trackingNum}"/> + <!-- place all issued items into a package for tracking num --> + <log level="info" message="QuickShipOrderByItem grouping by tracking number : ${parameters.trackingNum}"/> + <entity-one entity-name="ItemIssuance" value-name="itemIssuance"> + <field-map field-name="itemIssuanceId" env-name="parameters.itemIssuanceId"/> + </entity-one> - <entity-one entity-name="ItemIssuance" value-name="itemIssuance"> - <field-map field-name="itemIssuanceId" env-name="parameters.itemIssuanceId"/> - </entity-one> + <clear-field field-name="shipItemContext"/> + <set from-field="packageMap.${itemMap.trackingNum}" field="shipItemContext.shipmentPackageSeqId"/> + <if-empty field-name="shipItemContext.shipmentPackageSeqId"> + <set value="New" field="shipItemContext.shipmentPackageSeqId"/> + </if-empty> + <log level="info" message="Package SeqID : ${shipItemContext.shipmentPackageSeqId}"/> - <clear-field field-name="shipItemContext"/> - <set from-field="packageMap.${itemMap.trackingNum}" field="shipItemContext.shipmentPackageSeqId"/> - <if-empty field-name="shipItemContext.shipmentPackageSeqId"> - <set value="New" field="shipItemContext.shipmentPackageSeqId"/> - </if-empty> - <log level="info" message="Package SeqID : ${shipItemContext.shipmentPackageSeqId}"/> - - <set from-field="itemIssuance.shipmentId" field="shipItemContext.shipmentId"/> - <set from-field="itemIssuance.shipmentItemSeqId" field="shipItemContext.shipmentItemSeqId"/> - <set from-field="itemIssuance.quantity" field="shipItemContext.quantity"/> - <call-service service-name="addShipmentContentToPackage" in-map-name="shipItemContext"> - <result-to-field result-name="shipmentPackageSeqId" field-name="packageMap.${parameters.trackingNum}"/> - <result-to-field result-name="shipmentPackageSeqId" map-name="routeSegLookup"/> - </call-service> - - <if-not-empty field-name="shipmentPackageSeqId" map-name="routeSegLookup"> - <set from-field="itemIssuance.shipmentId" field="routeSegLookup.shipmentId"/> - <!-- quick ship orders should only have one route segment --> - <set value="00001" field="routeSegLookup.shipmentRouteSegmentId"/> - <find-by-primary-key entity-name="ShipmentPackageRouteSeg" map-name="routeSegLookup" value-name="packageRouteSegment"/> + <set from-field="itemIssuance.shipmentId" field="shipItemContext.shipmentId"/> + <set from-field="itemIssuance.shipmentItemSeqId" field="shipItemContext.shipmentItemSeqId"/> + <set from-field="itemIssuance.quantity" field="shipItemContext.quantity"/> + <call-service service-name="addShipmentContentToPackage" in-map-name="shipItemContext"> + <result-to-field result-name="shipmentPackageSeqId" field-name="packageMap.${parameters.trackingNum}"/> + <result-to-field result-name="shipmentPackageSeqId" map-name="routeSegLookup"/> + </call-service> - <if-not-empty field-name="packageRouteSegment"> - <set from-field="parameters.trackingNum" field="packageRouteSegment.trackingCode"/> - <store-value value-name="packageRouteSegment"/> - </if-not-empty> - <if-empty field-name="packageRouteSegment"> - <log level="warning" message="No route segment found : ${routeSegLookup}"/> - </if-empty> + <if-not-empty field-name="shipmentPackageSeqId" map-name="routeSegLookup"> + <set from-field="itemIssuance.shipmentId" field="routeSegLookup.shipmentId"/> + <!-- quick ship orders should only have one route segment --> + <set value="00001" field="routeSegLookup.shipmentRouteSegmentId"/> + <find-by-primary-key entity-name="ShipmentPackageRouteSeg" map-name="routeSegLookup" value-name="packageRouteSegment"/> + <if-not-empty field-name="packageRouteSegment"> + <set from-field="parameters.trackingNum" field="packageRouteSegment.trackingCode"/> + <store-value value-name="packageRouteSegment"/> </if-not-empty> - <if-empty field-name="routeSegLookup.shipmentPackageSeqId"> - <log level="warning" message="No shipment package ID found; cannot update RouteSegment"/> + <if-empty field-name="packageRouteSegment"> + <log level="warning" message="No route segment found : ${routeSegLookup}"/> </if-empty> + </if-not-empty> + <if-empty field-name="routeSegLookup.shipmentPackageSeqId"> + <log level="warning" message="No shipment package ID found; cannot update RouteSegment"/> + </if-empty> <!-- update the shipment status to packed --> <set from-field="shipment.shipmentId" field="packedContext.shipmentId"/> |
Free forum by Nabble | Edit this page |