Wasabi.Logic.Inventory
abstract class Wasabi.Logic.Inventory
Method Inventory
- CommitProduct()
- GetAvailableQuantity()
- LocateProduct()
- ReleaseProduct()
- RestockProduct()
- ShipCommittedProduct()
Methods
classmethod CommitProduct(outlet As Wasabi.Data.Outlet, product As Wasabi.Data.Product, quantity As %Integer, partialcommit As %Boolean = 0) as %Integer
Commits (as ordered) a quantity of product from a given outlet. If there is insufficient stock
to satisfy the entire quantity requested, the available quantity will be committed if partialcommit is true
or none will be committed if partialcommit is false. Returns the quantity committed
classmethod GetAvailableQuantity(outlet As Wasabi.Data.Outlet, product As Wasabi.Data.Product) as %Integer
Returns the quantity of product for a given outlet
classmethod LocateProduct(product As Wasabi.Data.Product) as %IResultSet
For a given product returns a prepared resultset with the following columns:
Outlet: id of the outlet
QuantityAvailable: quantity of product available at 'Outlet'
In descending order by quantity available.
classmethod ReleaseProduct(outlet As Wasabi.Data.Outlet, product As Wasabi.Data.Product, quantity As %Integer)
Releases a quantity of product from a given outlet which was previously committed
classmethod RestockProduct(outlet As Wasabi.Data.Outlet, product As Wasabi.Data.Product, quantity As %Integer)
Adds a quantity of product to the given outlet's stock
classmethod ShipCommittedProduct(outlet As Wasabi.Data.Outlet, product As Wasabi.Data.Product, quantity As %Integer)
Removes a committed quantity from the stock altogether