generate/cbs2.gif Warehouse Manager Trace Scan Hook generate/enh74c.jpg

Requires Warehouse Manager & Stock Tracing Components


 

The script file must be located in your CAPITAL program directory and must have the file name R-WHMSIP.MAC.

If the script can be found, it is executed when a serial number or other stock tracing property is scanned using the Warehouse Manager's Trace Scan facility.

Entry Values

Variable

Purpose

cScanCode

The value of the scanned bar code.

Stock->X

The fields of the stock table available for inspection.

Staux000->X

The fields of the stock user (auxiliary) table available for inspection.

Return Values

You should return TRUE if the scan was successful, otherwise FALSE if you wish to reject it.

You may also assign the value cScanCode, to override the value scanned as seen by CAPITAL. For example, if you are scanning bar codes that contain a 5 digit 'factory code' that is not relevant to the bar code, you can reformat the contents of cScanCode and strip this information out.

Example

* Remove the first 5 characters of the code being scanned

* if the bar code begins with the number 9

If Left(cScanCode, 1) = "9"

   cScanCode := Substr(cScanCode, 6)

Endif

Return TRUE

____________________________

Related Topics:

Scripting Hooks

Warehouse Manager Scripting Hooks



Help Topic Map