Invoice Save Action Hook (R-INSAVE.MAC) ![]()
The script file must be located in your CAPITAL program directory and must have the file name R-INSAVE.MAC. It is executed immediately after the save action is invoked on an invoice system transaction. (This may include adjustment notes, stock transfers, and other types of invoicing related transactions.)
Entry Values
|
Variable |
Purpose |
|
AccountBalance |
The total balance that exceeds the customer's credit limit. |
|
Amount |
The amount of the transaction. |
|
TotalDue |
The total amount the customer owes |
|
Custrec->X |
You may query the contents of the fields of the customer account. |
|
Cuaux000->X |
You may query the contents of the customer account's user fields if applicable. |
|
NewTran |
TRUE if the transaction is newly created, otherwise FALSE. |
Return Values
Return FALSE to cancel saving the transaction.
Comments
This script is invoked before prompting for transaction related dialogs appear, such as payment detail requests and credit checking.
If
you are using the WriteItemValue()
function to modify the contents of a transaction before it is saved, this is the hook that should be called.
If you wish to execute script after prompting for additional transaction information has occurred, use
the Invoice
Pre-saving Hook. If you wish to execute script after the transaction has been saved to the CAPITAL
database, call the Invoice
Post-saving Hook instead.
____________________________
Related Topics:
![]() |