generate/cbs2.gif Invoice Payment Prompt Hook (R-PTOTAL) generate/en72.jpg


 

The script file must be located in your CAPITAL program directory and must have the file name R-PTOTAL.MAC. It is executed during the saving process if a transaction prompts for payment information. The hook is not executed if there is no payment information required from the operator.

Entry Values

None.

Return Values

Return FALSE to cancel saving the transaction.

Comments

generate/notepad2.gif You may use this script to perform some action just before a transaction is saved. For example, the opening of a cash draw.

Example #1 - Open A Cash Draw

The following script "shells out" to a utility program that opens a cash draw.

* Open Cash Draw by Running Drawopen.exe program

RunApplication("Drawopen.exe", 0)

Example # 2 Open a Cash Draw

The following script opens a cash draw by sending ASCII control codes to LPT1 if the first form to print is called docket.sty and the number of copies to print is greater than zero.

* Send control codes ASCII 27, 255 and 0 to LPT1

If Upper(Action[1]) == "DOCKET" .And. Action[2] > 0

   SendDirect( { 27, 255, 0 }, "LPT1")

Endif

generate/notepad2.gifThe Invoice Pre-saving Hook may also be used for the same or similar purpose.

____________________________

Related Topics:

Credit Limit Check Hook

Invoice Pre-saving Hook

Invoice Post-saving Hook

Scripting Hooks

Script Programming

Transaction Script Functions



Help Topic Map