Semantic definitions
Hello,
I would need a hand to understand the semantics used in the code (class names and methods). @jakubbabiak and @24198 should have the answer(s).
-
InventoryAllocation -
InventorItem->(get|set|modify)AllocatedQuantity()vsInventorItem->(get|set|modify)Quantity()vsInventorItem->getVirtualQuantity()
What is an inventory allocation, and the difference between the quantity, the allocated quantity and the virtual quantity ?
Thanks
@gplanchat AFAIK,
-
Inventory Allocationis the process when a quantity of items is "reserved" for an order. -
Inventory Quantityis the total qty of an Item in the warehouse (CE), or in warehouses (EE), it represents the total Quantity available really on stock (real stock) -
Allocated Quantityis the part of the real stock reserved for the packing of orders.Allocated Quantityshould be either less or equal to theInventory Quantity. -
Virtual Quantityis the difference betweenInventory QuantityandAllocated Quantity, which is the real available stock right now for other orders.
In the actual marello's workflow :
-
Inventory Quantity, is defined when you create an Item, thisInventory Quantitycan be increased or decreased afterwards. - In order creation process, you select items, and affect quantity to this
orderItem. When you save this order which is not really an order, it passes to the state ofPending Order, which can be set toPickAndPackafter invoicement. - This PickAndPack step allocate the quantity you set in the Order, to the
Allocate Quantityfor this item, and by the way decrease theVirtual Quantity(which is the difference ofInventory QuantityandAllocated Quantity) - When the order is shipped, items or not available anymore in the
Inventory Quantity(Inventory Quantity minus Quantity shipped), and theAllocated Quantity, for this order is set to 0.
i.e: Item A Inventory: Inventory Quantity (IQ): 10 Allocated Quantity (AQ): 0 Virtual Quantity (VQ) : 10 (IQ - AQ)
Order #001 [Pending Order]
Item A x 5
==>
Order #001 set in PickAndPack state
Item A Inventory:
IQ : 10
AQ: 5
VQ: 5
This action is provided by a workflow post_action :marello_pick_pack_order, defined in workflow_actions.yml
Order #001 set in Shipped state
Item A Inventory:
IQ : 5
AQ: 0
VQ: 5
This action is provided by a workflow post_action :marello_ship_order, defined in workflow_actions.yml
Hope that helps :)