Author: apatel
Date: Mon Aug 6 11:01:59 2007 New Revision: 563208 URL: http://svn.apache.org/viewvc?view=rev&rev=563208 Log: Removed shippingFacilityId and cleaned up inventory reservation code. Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml ofbiz/trunk/applications/product/servicedef/services_facility.xml ofbiz/trunk/applications/product/servicedef/services_shipment.xml ofbiz/trunk/specialpurpose/oagis/config/oagis.properties ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?view=diff&rev=563208&r1=563207&r2=563208 ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Mon Aug 6 11:01:59 2007 @@ -275,7 +275,6 @@ <!-- Lets find the inventory to reserve --> <entity-and entity-name="InventoryItem" list-name="inventoryItems"> <field-map field-name="productId" env-name="parameters.productId"/> - <field-map field-name="facilityId" env-name="parameters.shippingFacilityId"/> <field-map field-name="inventoryItemTypeId" value="SERIALIZED_INV_ITEM"/> <field-map field-name="serialNumber" env-name="parameters.serialNumber"/> </entity-and> @@ -284,7 +283,7 @@ <!-- If no inventory item found for the serial number, than create it --> <if-empty field-name="inventoryItem"> <set field="receiveCtx.productId" from-field="parameters.productId"/> - <set field="receiveCtx.facilityId" from-field="parameters.shippingFacilityId"/> + <set field="receiveCtx.facilityId" from-field="facilityId"/> <set field="receiveCtx.quantityAccepted" from-field="parameters.quantity"/> <set field="receiveCtx.quantityRejected" value="0" type="Double"/> <set field="receiveCtx.inventoryItemTypeId" value="SERIALIZED_INV_ITEM"/> @@ -305,48 +304,21 @@ <refresh-value value-name="inventoryItem"/> <set value="INV_PROMISED" field="inventoryItem.statusId"/> <store-value value-name="inventoryItem"/> - <!-- get something else for other order, First try to get a Shadow for resv if not available then we'll try getting serialized item--> - <!-- Get the product's total quantityOnHand in the facility --> - <set from-field="parameters.productId" field="inputMap.productId"/> - <set from-field="facilityId" field="inputMap.facilityId"/> - <call-service service-name="getInventoryAvailableByFacility" in-map-name="inputMap"> - <result-to-field field-name="quantityOnHandTotal" result-name="quantityOnHandTotal"/> - <result-to-field field-name="availableToPromiseTotal" result-name="availableToPromiseTotal"/> - </call-service> - <if-compare operator="less" field-name="availableToPromiseTotal" value="1" type="Double"> - <entity-and entity-name="InventoryItem" list-name="inventoryItems"> - <field-map field-name="productId" env-name="parameters.productId"/> - <field-map field-name="inventoryItemTypeId" value="SERIALIZED_INV_ITEM"/> - <field-map field-name="statusId" value="INV_AVAILABLE"/> - </entity-and> - <first-from-list list-name="inventoryItems" entry-name="availableInventoryItem"/> - <!-- change status on available inventoryItem --> - <set value="INV_PROMISED" field="availableInventoryItem.statusId"/> - <store-value value-name="availableInventoryItem"/> - <set from-field="availableInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/> - <else> - <entity-and entity-name="InventoryItem" list-name="inventoryItems"> - <field-map field-name="productId" env-name="parameters.productId"/> - <field-map field-name="inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/> - </entity-and> - <first-from-list list-name="inventoryItems" entry-name="availableInventoryItem"/> - <set from-field="availableInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/> - </else> - </if-compare> + <!-- get something else for other order --> <!-- store OrderItemShipGrpInvRes record --> <set from-field="inventoryItemReservation.orderId" field="reserveOisgirMap.orderId"/> + <set from-field="parameters.productId" field="reserveOisgirMap.productId"/> <set from-field="inventoryItemReservation.orderItemSeqId" field="reserveOisgirMap.orderItemSeqId"/> <set from-field="inventoryItemReservation.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/> <set from-field="inventoryItemReservation.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/> <set from-field="inventoryItemReservation.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/> - <set from-field="inventoryItemReservation.promisedDatetime" field="reserveOisgirMap.promisedDatetime"/> <set field="reserveOisgirMap.quantity" value="1" type="Double"/> + <set field="reserveOisgirMap.requireInventory" value="N"/> <if-not-empty field-name="inventoryItemReservation.sequenceId"> <set field="reserveOisgirMap.sequenceId" from-field="inventoryItemReservation.sequenceId"/> </if-not-empty> - <call-service service-name="reserveOrderItemInventory" in-map-name="reserveOisgirMap"/> + <call-service service-name="reserveProductInventory" in-map-name="reserveOisgirMap"/> <clear-field field-name="reserveOisgirMap"/> - <clear-field field-name="availableInventoryItem"/> </if-not-empty> <!-- Step 3 Now Reserve for our order--> @@ -613,6 +585,7 @@ </if-compare> </simple-method> </simple-methods> + Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?view=diff&rev=563208&r1=563207&r2=563208 ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Mon Aug 6 11:01:59 2007 @@ -244,7 +244,6 @@ <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/> <attribute name="requireInventory" type="String" mode="IN" optional="false"/> <attribute name="serialNumber" type="String" mode="IN" optional="true"/> - <attribute name="shippingFacilityId" type="String" mode="IN" optional="true"/> <attribute name="sequenceId" type="Long" mode="IN" optional="true"/> <attribute name="promisedDatetime" type="Timestamp" mode="IN" optional="false"/> </service> Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?view=diff&rev=563208&r1=563207&r2=563208 ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Mon Aug 6 11:01:59 2007 @@ -689,7 +689,6 @@ <attribute name="quantityNotReserved" type="Double" mode="IN" optional="true"/> <attribute name="promisedDatetime" type="Timestamp" mode="IN" optional="false"/> <attribute name="shipmentPackageSeqId" type="String" mode="IN" optional="true"/> - <attribute name="shippingFacilityId" type="String" mode="IN" optional="true"/> </service> <service name="setShipmentStatusPackedAndShipped" engine="simple" location="org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="setShipmentStatusPackedAndShipped" auth="true"> Modified: ofbiz/trunk/specialpurpose/oagis/config/oagis.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/config/oagis.properties?view=diff&rev=563208&r1=563207&r2=563208 ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/config/oagis.properties (original) +++ ofbiz/trunk/specialpurpose/oagis/config/oagis.properties Mon Aug 6 11:01:59 2007 @@ -39,7 +39,6 @@ Oagis.Warehouse.SyncInventoryFacilityId=WebStoreWarehouse Oagis.Warehouse.SyncInventoryProductStoreId=9001 -Oagis.Warehouse.ShippingFacilityId=WebStoreWarehouse # Client Cert, etc settings #auth.client.certificate.alias=testrpckey #auth.basic.username=foo Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?view=diff&rev=563208&r1=563207&r2=563208 ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Mon Aug 6 11:01:59 2007 @@ -189,7 +189,6 @@ String shipGroupSeqId = shipment.getString("primaryShipGroupSeqId"); String originFacilityId = shipment.getString("originFacilityId"); - String shippingFacilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.ShippingFacilityId"); List shipUnitElementList = UtilXml.childElementList(daShowShipmentElement, "ns:SHIPUNIT"); // n if(UtilValidate.isNotEmpty(shipUnitElementList)) { @@ -229,7 +228,6 @@ isitspastCtx.put("shipmentId", shipmentId); isitspastCtx.put("shipmentPackageSeqId", shipmentPackageSeqId); isitspastCtx.put("promisedDatetime", orderItemShipGrpInvReservation.get("promisedDatetime")); - isitspastCtx.put("shippingFacilityId", shippingFacilityId); List invDetailElementList = UtilXml.childElementList(invItemElement, "ns:INVDETAIL"); //n if(UtilValidate.isNotEmpty(invDetailElementList)) { Iterator invDetailElementItr = invDetailElementList.iterator(); |
Free forum by Nabble | Edit this page |