gtINStockTakeCountLine
This function provides the information required to update inventory item stocktake counts. The function must be linked to its gtINStockTakeCount header by using the unique identifier returned by that function.
Note: If there are items in a stocktake for which counts are not entered using this function, the Uncounted option of the stocktake (if applicable) applies.
StockTakeReference
This is the unique identifier generated by gtINStockTakeCount. .
StockItem
This is the item code of the item for which the counted quantity applies. It must be an exact string match.
CountQuantity
This is the counted quantity for the selected item/location/serial/lot/dimension (if applicable) combination. Zero is a valid entry (represents zero count), and the format must be valid according to the item's decimal item unit.
Note: If the count relates to a dimension, the quantity is assumed to be a unit quantity. This is converted to a UOM quantity as part of the transaction update process.
Serial/Lot
This is the serial/lot number of the item/location count quantity. It must be an exact string match to a valid serial/lot number for the selected item.
Note: This option is mandatory if serial/lot in use and the specified item is serial/lot controlled.
Dimension
This is the dimension of the item/location/serial/lot (if applicable) count quantity. It must be an exact string match to a valid dimension for the selected item.
Note: This option is mandatory if dimensions are use and the specified item is dimension controlled.
Location
This is the location of the item for which the counted quantity applies. It must be an exact string match to a valid location for the selected item.
If WBM is in use this must exactly match a valid bin path.
True and False are valid entries here. If true, this indicates the count is added to the existing count. If false, the count will replace the existing count.
Note: This option is mandatory if locations are use.
Approved
This is the approval flag of the stocktake count. It should be left empty in the first instance and is enabled when:
- The selected stocktake has an approval action (all or ranges).
- The count quantity for selected item/location/serial/lot/dimension triggers approval action.
True and False are valid entries here. If true, the count quantity is assumed approved and can be updated using the function. If False, the count quantity is not approved and are not updated using the function.
Returns
INSTK-nnn-mmm - if no errors are encountered.
Example
=gtINStockTakeCountLine(INSTK-nnn,ItemA,A01,Lot1,Dim1,100)
Errors Returned
- Invalid source line reference
- Stock item is invalid
- Stock item does not belong to stocktake
- Location is invalid
- Location is not for item
- Location NNN is invalid if the bin does not exist.
- Item is serial/lot controlled. A serial/lot number must be entered.
- Serial/Lot is not for item/location combination
- Item is dimension controlled. A dimension must be entered.
- Dimension is not for item/location/serial/lot combination
- Count quantity does not match item decimal unit
- Dimension count must be an integer (unit) value.