I intended for the user to specify the intended facility.  Once the id has
been saved on the order item the reservation services would treat the item
as always except for the fact that it would simply know which facility to
check reservations against.  If not enough inventory the item becomes back
ordered?


I am referencing the restoreStoreInventory method in
productStoreServices.xml.  If a product store is configured as a single
facility it attempts to reserve inventory at that facility and returns a
quantity not reserved.

 

-----Original Message-----
From: David Jones [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 30, 2008 1:38 PM
To: [email protected]
Cc: Nick Rosser; Dave Tenerowicz; [EMAIL PROTECTED]
Subject: RE: Creating Single orders whcih have products thatneed to ship
from differnt facilities


Len,

Before I can comment I still need an answer to the question about how you
intend for this to be used.

Do you want the system to figure out which facility to use based on certain
criteria? Do you want the user to specify the desired facility? If the user
specifies a facility and the inventory turns out to not be available in that
facility (wasn't checked, or something else has reserved it before the order
if finalized), then what should happen? And so on...

-David



On Wed, 30 Jul 2008 13:33:26 -0400, "Len" <[EMAIL PROTECTED]> wrote:
> Dave,
> 
> I agree 100%, yes I simply want the facility that the product should
> reserve
> from.  I think I should actually extend the order item entity to accept
> the
> facility id.  I did take a bit of a shortcut using the fromInventoryId so
> I
> would not have to change much code in the ShoppingCart (it already had a
> placeholder to store it).
> 
> The only place I found that uses the fromInventoryId seems to be for
> subscriptions.
> 
> 
> If you think the effort is worthwhile I can take a look at what it takes
> to
> change the ShoppingCart to take in the facility id and the create order
> services which generate orders based on the cart settings?
> 
> 
> 
> -----Original Message-----
> From: David Jones [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 30, 2008 1:15 PM
> To: [email protected]
> Cc: Nick Rosser; Dave Tenerowicz; [EMAIL PROTECTED]
> Subject: Re: Creating Single orders whcih have products thatneed to ship
> from differnt facilities
> 
> 
> Len,
> 
> What is the reason to use the OrderItem.fromInventoryItemId field?
> 
> Actually I don't like the idea of that field in general, and even
> searching
> around the code am having trouble finding (and remembering...) what it is
> used for.
> 
> In any case, it seems the be that what you really want to get to is the
> Facility to reserve in. Specifying the inventoryItemId desired is kind of
> funny if you only want the facilityId from it because having the
> inventoryItemId implies a lot more (like desire to reserve against that
> specific InventoryItem, or perhaps that a reservation should exist already
> for it or something).
> 
> From a use perspective are you saying that you want the user of the system
> to select the Facility to fulfill from for each OrderItem in an order? If
> so, let's talk about how to go about that more directly and not try to
> reuse
> something meant for a different purpose.
> 
> -David
> 
> 
> On Wed, 30 Jul 2008 09:41:10 -0400, "Len" <[EMAIL PROTECTED]> wrote:
>>
>>
>> All,
>>
>>
>>
>> I needed to create an order with many order items which are shipped from
>> one
>> or more facilities and for different shipment dates. In order to
>> accomplish
>> this I needed to make some configuration changes and some minor changes
> to
>> the existing Ofbiz framework.  I am documenting the changes below.  If
>> anyone sees any reason this should not work or have already solved this
>> matter differently please let me know. I am looking to eventually submit
>> these changes back to the trunk.
>>
>>
>>
>>
>>
>>
>>
>> Product Store Configuration.
>>
>> *    On the product store edit screen:
>> *    set the One Inventory Facility flag to 'N'.
>> *    To associate your product store to many facilities you need to
>> execute the update button for each different facility you want
> associated.
>> Although the edit screen does not display the many facility associations
>> an
>> entry for each productStore-facility is written to the DB in
>> entity:ProductStoreFacility.
>>
>>
>>
>> Order Item Entry
>>
>> *    On order creation the 'orderItem.fromInventoryId' of each order item
>> is populated with the inventory item id based on the product/inventory
>> item
>> selected.
>> *    Create a ship group for each facility (related facility of the
>> inventory item), ship date combination.
>>
>>
>>
>> Order Services
>>
>> *    Method: reserveInventory()
>> *    In the reserve inventory method of this service each order item is
>> interrogated to see if the fromInventoryItemId was passed.  If so the
>> related facility of the item is passed to the reserve Inventory service
>> specifying where availability and reservations should be done.
>>
>>
>>
>> Reserve Store Inventory
>>
>> *    ProductStoreServices.xml
>> *    Simple Method: reserveStoreInventory
>> *    Modified the service parameters to accept an optional 'facilityId'
>> field.
>> *    If a specific facilityId is passed in to this method:
>>
>> *    Perform sanity check against the entity:ProductStoreFacility to
>> insure the facility has been associated to the product store (required
>> param
>> of the service).  In other words does this Product Store ship products
>> from
>> this facility?
>> *    Call Simple Method reserveProductInventoryByFacility.
>>
>>
>>
>>
>>
>>
>>
>> Test Data
>>
>>
>>
>> Product Store
>>
>> *    Ofbiz E-Commerce Store (Product Store Id - 9000)
>>
>> *    Inventory Facility Id - WebStoreWarehouse
>> *    One Inventory Facility - N
>> *    Check Inventory - Y
>> *    Reserve Inventory - Y
>> *    Is Immediately Fulfilled - N
>>
>> *    Ofbiz Physical Retail Store (Product Store Id - 9100)
>>
>> *    Inventory Facility Id - MyRetailStore
>> *    One Inventory Facility - N
>> *    Check Inventory - Y
>> *    Reserve Inventory - Y
>> *    Is Immediately Fulfilled - N
>>
>>
>>
>> Product Store Facility
>>
>> *    Product Store Id - (9000) Facility Id - (WebStoreWarehouse)
>> *    Product Store Id - (9000) Facility Id - (MyReatilStore)
>>
>>
>>
>> *    Product Store Id - (9100) Facility Id - (MyRetailStore)
>> *    Product Store Id - (9100) Facility Id - (WebStoreWarehouse)
>>
>>
>>
>>
>>
>> Order Items
>>
>> *    Product Id - GZ-1001
>>
>> *    Inventory Item Id - 10080 (Facility Id - WebStoreWarehouse)
>> *    Ship Date - 07/30/08
>>
>> *    Product Id - GZ-1000
>>
>> *    Inventory Item Id - 10079 (Facility Id - MyRetailStore)
>> *    Ship Date - 07/29/08
>>
>> *    Two ship groups are created (0001,0002)
>>
>>
>>
>> Order
>>
>> *    For accounting purposes the Order is created using the product store
>> Ofbiz E-Commerce Store (9000)
>>
>>
>>
>> Results
>>
>> *    A single order was created
>> *    Inventory was reserved for each product at it's respective facility
>> *    After running pick and pack services separate packing slips,
>> shipments were generated for each ship group from their respective
>> facilities.
>>
>>
>>
>>
>>
>> Thank You
>>
>>
>>
>> Len Shein
>>
>>
>>
>>  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>>
>>
>>
>> Office:  516.742.7888 ext. 225
>>
>> Office:  732.333.4303
>>
>>
>>
>>
>>
>>
>>



Reply via email to