Reorder Level Hook (R-REORD.MAC) ![]()
The script file must be located in your CAPITAL program directory and must have the file name R-REORD.MAC.
Entry Values
|
Variable |
Purpose |
|
QtyInStock |
The quantity physically in stock. |
|
QtyAllocated |
The quantity allocated or reserved for customers, jobs, assemblies, etc. |
|
QtyFree |
The quantity of stock free for sale. This is calculated as QtyInStock minus QtyAllocated. |
|
QtyMaximum |
This is the maximum quantity that should ideally be held in stock. |
|
QtyReorder |
The quantity reorder point level. When a stock item reaches this quantity or below, a reorder request is normally triggered. |
|
QtyBackOrder |
The total quantity back ordered. (Some or all of this quantity may also be allocated/reserved.) |
|
QtyOnOrder |
The quantity on order from your suppliers. |
|
QtyBuilding |
The quantity that is expected to be be built. This quantity is specified in the Assembly Manager. |
|
QtyProduce |
The quantity that has been assigned to produce or manufacture for assembly tasks. |
|
QtyNeeded |
The total quantity that the stock reorder service has calculated as needed. |
|
QtyExtraNeed |
The extra quantity needed that the CAPITAL system has requested. (This quantity is included as part of the QtyNeeded total.) |
|
Stock->X |
You may query the contents of the fields of the stock record. |
|
Staux000->X |
You may query the contents of any user fields if applicable. |
Return Values
Return a numeric value to assign the quantity needed when reordering. To implement the default system behaviour execute this statement:
Return QtyNeeded
If any other value is returned, the return value is ignored and QtyNeeded is used as the reorder quantity.
Comments
The quantity to reorder is always rounded to CAPITAL's default rounding settings by default. For example, if CAPITAL has been set to handle quantities up to 3 decimal places, then if a number containing 4 decimal places is returned, CAPITAL will round the result to 3 decimal places automatically.
____________________________
Related Topics:
![]() |