You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2008/04/04 10:09:42 UTC

svn commit: r644637 - in /ofbiz/trunk/applications: order/servicedef/secas.xml product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml product/servicedef/services_facility.xml

Author: jacopoc
Date: Fri Apr  4 01:09:38 2008
New Revision: 644637

URL: http://svn.apache.org/viewvc?rev=644637&view=rev
Log:
Implemented logic to assign reservations for new sales orders according to the priority given by the ship before date.

Modified:
    ofbiz/trunk/applications/order/servicedef/secas.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
    ofbiz/trunk/applications/product/servicedef/services_facility.xml

Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=644637&r1=644636&r2=644637&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Fri Apr  4 01:09:38 2008
@@ -29,6 +29,9 @@
         <condition field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
         <action service="checkCreateDropShipPurchaseOrders" mode="sync" run-as-user="system"/>
     </eca>
+    <eca service="storeOrder" event="return">
+        <action service="balanceOrderItemsWithNegativeReservations" mode="sync"/>
+    </eca>
     <eca service="changeOrderItemStatus" event="commit">
         <condition field-name="statusId" operator="equals" value="ITEM_CANCELLED"/>
         <action service="cancelOrderInventoryReservation" mode="sync"/>

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?rev=644637&r1=644636&r2=644637&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Fri Apr  4 01:09:38 2008
@@ -447,6 +447,10 @@
     <simple-method method-name="reserveOrderItemInventory" short-description="Reserve Order Item Inventory">
         <entity-one entity-name="OrderItemShipGrpInvRes" value-name="checkOisgirEntity"/>
         
+        <entity-one entity-name="OrderItem" value-name="orderItem"/>
+        <set field="parameters.promisedDatetime" from-field="orderItem.shipBeforeDate"/>
+        <set field="parameters.currentPromisedDate" from-field="orderItem.shipBeforeDate"/>
+
         <if-empty field-name="checkOisgirEntity">
             <!-- create OrderItemShipGrpInvRes record -->
             <make-value entity-name="OrderItemShipGrpInvRes" value-name="newOisgirEntity"/>

Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=644637&r1=644636&r2=644637&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Fri Apr  4 01:09:38 2008
@@ -248,7 +248,8 @@
         <description>Balance inventory reservations for a given product/facility, considering all the reservations with promised date greater than fromDate.</description>
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
-        <attribute name="fromDate" type="String" mode="IN" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
+        <attribute name="noLongerOnBackOrderIdSet" type="Set" mode="OUT" optional="true"/>
     </service>
     <service name="balanceOrderItemsWithNegativeReservations" engine="simple" 
                 location="org/ofbiz/product/inventory/InventoryServices.xml" invoke="balanceOrderItemsWithNegativeReservations">