Freight Prompting Hook (R-INFC.MAC & R-INFCP.MAC)
![]()
These script files must be located in your CAPITAL program directory and must have the file names R-INFC.MAC or R-INFCP.MAC.
Entry Values
|
Variable |
Purpose |
|
Action |
Contains the value Y if the user has been or will be prompted to enter a freight amount. Otherwise the value is N. |
|
Value1 |
0 = this script is being called from invoicing 1 = this script is being called from invoicing and it is also a back order release invoice. 2 = this script is being called from a sales order. |
|
Orders->X |
If Value1 = 1, you may query the contents of the sales order the back order release invoice was based on. |
Return Values
These scripts must return either no value (in which case no action will be taken) or an array containing two elements. The first element must contain a numeric value between 1-4. This defines which freight charge is to be altered. The second element contains the amount for this freight charge. For example, returning the value { 3, 100 } will place $100 in the 3rd freight field.
Comments
The script R-INFC.MAC is executed before any freight prompting occurs. This can be used to suggest freight charges.
The script R-INFCP.MAC is executed after any freight prompting has already occurred.
Example #1
If Action = "Y" .And. Custrec->Cusfreiask == "Y"
Return { 1, Custrec->Cusfreight }
Endif
Example #2
* If this is a back order release invoice and
* the original order's freight value was zero
* also return zero for the invoice
If Value1 = 1
if Orders->Freight = 0
Return { 1, 0 }
Endif
Endif
____________________________
Related Topics:
![]() |