dw.catalog
Class ProductInventoryRecord
Object
dw.object.PersistentObject
dw.object.ExtensibleObject
dw.catalog.ProductInventoryRecord
The ProductInventoryRecord holds information about a Product's inventory, and availability.
Properties
allocation  :  Quantity
The allocation quantity that is currently set. The quantity unit is the same unit as the product itself.
allocationResetDate  :  Date  (Read Only)
The date the allocation quantity was initialized or reset.
ATS  :  Quantity  (Read Only)
The quantity of items available to sell (ATS). This is calculated as the allocation ( getAllocation()) plus the preorderBackorderAllocation (getPreorderBackorderAllocation()) minus the turnover (getTurnover()) minus on order (getOnOrder()).
backorderable  :  boolean
Determines if the product is backorderable.
inStockDate  :  Date
The date that the item is expected to be in stock.
onHand  :  Quantity  (Read Only)
The on-hand quantity, the actual quantity of available (on-hand) items.
Deprecated:
Use getStockLevel() instead.
onOrder  :  Quantity  (Read Only)
The quantity that is currently on order.

This is only relevant when On Order Inventory is turned on for the related inventory list. On Order is a bucket of inventory used for the time between order creation and order export to external (warehouse) systems. On Order value is increased when an order is created. It will be decreased and with that turnover will be increased when the order is exported, see getTurnover(). Notice that Order.setExportStatus(Number) and OrderItem.allocateInventory(Boolean) will decrease the On Order value. On order will be included in the ATS calculation, see getATS().

perpetual  :  boolean
Determines if the product is perpetually in stock.
preorderable  :  boolean
Determines if the product is preorderable.
preorderBackorderAllocation  :  Quantity
The quantity of items that are allocated for sale, beyond the initial stock allocation.
reserved  :  Quantity  (Read Only)
The quantity of items that are reserved. Note, that for products with high velocity and concurrency the return value is extremely volatile and the retrieval will be expensive.
stockLevel  :  Quantity  (Read Only)
The current stock level. This is calculated as the allocation minus the turnover.
turnover  :  Quantity  (Read Only)
The sum of all inventory transactions (decrements and increments) that have been recorded subsequent to the allocation was reset date. The quantity value can be negative due to higher quantity of inventory decrements than increments.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getAllocation() : Quantity
Returns the allocation quantity that is currently set.
getAllocationResetDate() : Date
Returns the date the allocation quantity was initialized or reset.
getATS() : Quantity
Returns the quantity of items available to sell (ATS).
getInStockDate() : Date
Returns the date that the item is expected to be in stock.
getOnHand() : Quantity
Returns the on-hand quantity, the actual quantity of available (on-hand) items.
getOnOrder() : Quantity
Returns the quantity that is currently on order.
getPreorderBackorderAllocation() : Quantity
Returns the quantity of items that are allocated for sale, beyond the initial stock allocation.
getReserved() : Quantity
Returns the quantity of items that are reserved.
getStockLevel() : Quantity
Returns the current stock level.
getTurnover() : Quantity
Returns the sum of all inventory transactions (decrements and increments) that have been recorded subsequent to the allocation was reset date.
isBackorderable() : boolean
Determines if the product is backorderable.
isPerpetual() : boolean
Determines if the product is perpetually in stock.
isPreorderable() : boolean
Determines if the product is preorderable.
setAllocation(quantity : Number) : void
Sets the allocation quantity.
setBackorderable(backorderableFlag : boolean) : void
The method is used to set whether the product is backorderable.
setInStockDate(inStockDate : Date) : void
Sets the date that the item is expected to be in stock.
setPerpetual(perpetualFlag : boolean) : void
Sets if the product is perpetually in stock.
setPreorderable(preorderableFlag : boolean) : void
The method is used to set whether the product is preorderable.
setPreorderBackorderAllocation(quantity : Number) : void
Sets the quantity of items that are allocated for sale, beyond the initial stock allocation.
Methods inherited from class ExtensibleObject
Methods inherited from class PersistentObject
Methods inherited from class Object
Method Detail
getAllocation
getAllocation() : Quantity
Returns the allocation quantity that is currently set. The quantity unit is the same unit as the product itself.
Returns:
the allocation quantity or quantity N/A if not available.

getAllocationResetDate
getAllocationResetDate() : Date
Returns the date the allocation quantity was initialized or reset.
Returns:
the allocation reset date.

getATS
getATS() : Quantity
Returns the quantity of items available to sell (ATS). This is calculated as the allocation ( getAllocation()) plus the preorderBackorderAllocation (getPreorderBackorderAllocation()) minus the turnover (getTurnover()) minus on order (getOnOrder()).
Returns:
the quantity or quantity N/A if not available.

getInStockDate
getInStockDate() : Date
Returns the date that the item is expected to be in stock.
Returns:
the date that the item is expected to be in stock.

getOnHand
getOnHand() : Quantity
Returns the on-hand quantity, the actual quantity of available (on-hand) items.
Deprecated:
Use getStockLevel() instead.
Returns:
the on-hand quantity or quantity N/A if not available.

getOnOrder
getOnOrder() : Quantity
Returns the quantity that is currently on order.

This is only relevant when On Order Inventory is turned on for the related inventory list. On Order is a bucket of inventory used for the time between order creation and order export to external (warehouse) systems. On Order value is increased when an order is created. It will be decreased and with that turnover will be increased when the order is exported, see getTurnover(). Notice that Order.setExportStatus(Number) and OrderItem.allocateInventory(Boolean) will decrease the On Order value. On order will be included in the ATS calculation, see getATS().

Returns:
the quantity or quantity N/A if not available.

getPreorderBackorderAllocation
getPreorderBackorderAllocation() : Quantity
Returns the quantity of items that are allocated for sale, beyond the initial stock allocation.
Returns:
the quantity or quantity N/A if not available.

getReserved
getReserved() : Quantity
Returns the quantity of items that are reserved. Note, that for products with high velocity and concurrency the return value is extremely volatile and the retrieval will be expensive.
Returns:
the quantity of items reserved for this product.

getStockLevel
getStockLevel() : Quantity
Returns the current stock level. This is calculated as the allocation minus the turnover.
Returns:
the stock level or quantity N/A if not available.

getTurnover
getTurnover() : Quantity
Returns the sum of all inventory transactions (decrements and increments) that have been recorded subsequent to the allocation was reset date. The quantity value can be negative due to higher quantity of inventory decrements than increments.
Returns:
the turnover or quantity N/A if not available.

isBackorderable
isBackorderable() : boolean
Determines if the product is backorderable.
Returns:
true if the product is backorderable.

isPerpetual
isPerpetual() : boolean
Determines if the product is perpetually in stock.
Returns:
true if the product is perpetually in stock.

isPreorderable
isPreorderable() : boolean
Determines if the product is preorderable.
Returns:
true if the product is preorderable.

setAllocation
setAllocation(quantity : Number) : void
Sets the allocation quantity. This also updates the allocation reset date.
Parameters:
quantity - the allocation quantity to set.

setBackorderable
setBackorderable(backorderableFlag : boolean) : void
The method is used to set whether the product is backorderable. Setting the backorderable flag to true will clear the preorderable flag. If the record's preorderable flag is set to true, calling this method with backorderableFlag==false will have no effect.
Parameters:
backorderableFlag - the flag to set backorderable status.

setInStockDate
setInStockDate(inStockDate : Date) : void
Sets the date that the item is expected to be in stock.
Parameters:
inStockDate - the date that the item is expected to be in stock.

setPerpetual
setPerpetual(perpetualFlag : boolean) : void
Sets if the product is perpetually in stock.
Parameters:
perpetualFlag - true to set the product perpetually in stock.

setPreorderable
setPreorderable(preorderableFlag : boolean) : void
The method is used to set whether the product is preorderable. Setting the preorderable flag to true will clear the backorderable flag. If the record's backorderable flag is set to true, calling this method with preorderableFlag==false will have no effect.
Parameters:
preorderableFlag - the flag to set preorderable status.

setPreorderBackorderAllocation
setPreorderBackorderAllocation(quantity : Number) : void
Sets the quantity of items that are allocated for sale, beyond the initial stock allocation.
Parameters:
quantity - the quantity to set.