Thursday, October 30, 2008

Inventory Computations

The quantity a customer requests may be available in full or in part, and can be fulfilled through back-ordering (if back-ordering is allowed) or preordering (if preordering is allowed).
This is an algorithm of Inventory Computations:
If the product catalog is not mapped to an inventory catalog:
BEGIN
If (Treat missing as OutofStock) = true
Inventory SKU condition = OutofStock
Else
Inventory SKU condition = InStock
END
Else
BEGIN
If Stock Handling = 0
BEGIN
If stock status = Disabled
Inventory SKU condition = OutofStock
Else If stock status = Ignored
Inventory SKU condition = InStock
Else If stock status = Enabled
BEGIN
If OnHand Quantity > Effective Stockout Threshold
Inventory SKU condition = InStock
Else
Inventory SKU condition = OutofStock
END
END
Else If Stock Handling = 1
BEGIN
If stock status = Disabled
Inventory SKU condition = OutofStock
Else If stock status = Ignored
Inventory SKU condition = InStock
Else If Stock status = Enabled
BEGIN
If OnHand Quantity > Effective Stockout Threshold
Inventory SKU condition = InStock
Else If (Product is Preorderable AND OnHand Quantity > (Effective Stockout
Threshold + PreorderLimit)
Inventory SKU condition = Preordered
Else If (Product is Backorderable AND OnHand Quantity > (Effective Stockout
Threshold + PreorderLimit + BackorderLimit)
Inventory SKU condition = BackOrdered
Else
Inventory SKU condition = OutofStock
END
END
END