Invoice Payment Prompt Hook (R-PTOTAL) ![]()
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
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
The
Invoice
Pre-saving Hook may also be used for the same or similar purpose.
____________________________
Related Topics:
![]() |