generate/cbs2.gif EFT Remittance Hook (R-EFTSND.MAC)

Electronic Document Exchange Only


 

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

Entry Values

Variable

Purpose

EmailAddress

Blank. Set this to an email address if you want the current remittance to be emailed.

FaxNumber

Blank. Set this to the fax number if you want the current remittance to be faxed. (Requires that suitable Fax Server software be installed.)

SendToPrinter

Set this value to TRUE if you want the statement to be printed to paper. Otherwise leave it unassigned.

Supplier->X

You may query the contents of the fields of the supplier account.

Suaux000->

You may query the contents of the supplier account's user fields if applicable.

Return Values

If the script returns TRUE the statement will be emailed, faxed or printed, based on the settings made by the script. If the script returns any other value or CAPITAL cannot determine your variable settings, or no output options are specified, no action will be taken.

To Email a form set the email address like so:

EmailAddress := Supplier->Supeemail

To fax a form set the fax number like so:

FaxNumber := Supplier->Fax

To print a form set the SendToPrinter variable to TRUE.

SendToPrinter := TRUE

Example

* Check a user defined field for emailing

* This assumes the field 'Sendemail' has been

* added to the system using the Screen Builder

If Suaux000->Sendemail == "Y"

   If .Not. IsEmpty(Supplier->Supemail)

      EmailAddress := Supplier->Supemail

      Return TRUE

   Endif

Endif

* Otherwise send to printer

SendToPrinter := TRUE

Return TRUE

____________________________

Related Topics:

EFT Remittances

Scripting Hooks

Script Programming



Help Topic Map