Author: jaz
Date: Mon Apr 30 19:59:48 2007 New Revision: 533919 URL: http://svn.apache.org/viewvc?view=rev&rev=533919 Log: added new field OrderItem.fromInventoryItemId Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?view=diff&rev=533919&r1=533918&r2=533919 ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Mon Apr 30 19:59:48 2007 @@ -439,6 +439,7 @@ <field name="orderItemTypeId" type="id-ne"></field> <field name="orderItemGroupSeqId" type="id-ne"></field> <field name="isItemGroupPrimary" type="indicator"></field> + <field name="fromInventoryItemId" type="id"></field> <field name="budgetId" type="id"></field> <field name="budgetItemSeqId" type="id"></field> <field name="productId" type="id"></field> @@ -491,6 +492,9 @@ </relation> <relation type="one" fk-name="ORDER_ITEM_PRODUCT" rel-entity-name="Product"> <key-map field-name="productId"/> + </relation> + <relation type="one" fk-name="ORDER_ITEM_FMINV" title="From" rel-entity-name="InventoryItem"> + <key-map field-name="fromInventoryItemId" rel-field-name="inventoryItemId"/> </relation> <relation type="one" fk-name="ORDER_ITEM_RFUOM" title="RecurringFreq" rel-entity-name="Uom"> <key-map field-name="recurringFreqUomId" rel-field-name="uomId"/> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?view=diff&rev=533919&r1=533918&r2=533919 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Apr 30 19:59:48 2007 @@ -3212,6 +3212,11 @@ orderItem.set("shipBeforeDate", item.getShipBeforeDate()); orderItem.set("shipAfterDate", item.getShipAfterDate()); + String fromInventoryItemId = (String) item.getAttribute("fromInventoryItemId"); + if (fromInventoryItemId != null) { + orderItem.set("fromInventoryItemId", fromInventoryItemId); + } + result.add(orderItem); // don't do anything with adjustments here, those will be added below in makeAllAdjustments } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?view=diff&rev=533919&r1=533918&r2=533919 ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Mon Apr 30 19:59:48 2007 @@ -71,7 +71,7 @@ public static final String resource = "OrderUiLabels"; public static final String resource_error = "OrderErrorUiLabels"; public static String[] attributeNames = { "shoppingListId", "shoppingListItemSeqId", "surveyResponses", - "itemDesiredDeliveryDate", "itemComment"}; + "itemDesiredDeliveryDate", "itemComment", "fromInventoryItemId"}; private transient GenericDelegator delegator = null; /** the actual or variant product */ |
Free forum by Nabble | Edit this page |