Implemented logic to assign reservations for new sales orders according to the priority given by the ship before date.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@644637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2008-04-04 08:09:38 +00:00
parent 6ab6a5f76e
commit 57d530878d
3 changed files with 9 additions and 1 deletions
+3
View File
@@ -29,6 +29,9 @@ under the License.
<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"/>
@@ -447,6 +447,10 @@ under the License.
<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"/>
@@ -248,7 +248,8 @@ under the License.
<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">