Hi, InventoryItem is the item in stock within a facility, so it has relationships to the product, expiry dates, and so on.
InventoryItemDetail is a history of the changes to the item as stock arrives and leaves. OFBiz does not directly modify the quantity on hand for an Inventory Item. Rather, there's a service to create a new Inventory Item Detail which also modifies the QOH. This is much like a bank account - you don't directly modify the balance, rather there are deposits and withdrawals which keep a history of every change to the balance. I often think InventoryItemDetail is badly named, and perhaps should be InventoryItemHistory, or some other word to do with changes or transactions. InventoryTransfer records when you move stock between facilities. If you receive goods into a facility and despatch them to fill orders or as an input to a manufacturing process, there will be no InventoryTransfer records at all. OFBiz only needs an InventoryTransfer when you adjust stock levels by moving them between facilities. Note that the InventoryTransfer entity has attributes for two facilities. So if there is an InventoryTransfer, there will also be InventoryItemDetail records for the two facilities involved. You shouldn't need to calculate the inventory levels for a stock move at all. You'd call the right service and tell OFBiz the inventory item and the quantity. Have a look at /facility/control/TransferInventoryItem and the createInventoryTransfer service. Please ask questions like this on the ofbiz users mailing list [email protected], see https://ofbiz.apache.org/mailing-lists.html for details. Hope that helps. Paul Foxworthy On 14 February 2017 at 21:50, Sapphire R&D_Thailand < [email protected]> wrote: > Hi !! > > How to calculate inventory of stock move and explain relation between > Inventory_item Table , Inventory_item_details Table , inventory_transfer > Table and etc. ? > > Thank you. > Sapphire > -- Coherent Software Australia Pty Ltd PO Box 2773 Cheltenham Vic 3192 Australia Phone: +61 3 9585 6788 Web: http://www.coherentsoftware.com.au/ Email: [email protected]
