generate/cbs2.gif Supplier Special Pricing Hook (R-SSP.MAC)

generate/enh73.jpg


 

This script must be located in your CAPITAL program directory and must have the file name R-SSP.MAC. It may be used to override the default system cost price when a purchase order or stock receipt is raised for a stock item.

Entry Values

Variable

Purpose

Quantity

The quantity being ordered.

DateTran

The date of the transaction.

Stock->X

You may query the contents of the fields of the stock record.

Staux000->X

You may query the contents of any user fields if applicable.

Supplier->X

You may query the contents of the fields of the supplier record for the related transaction.

Suaux000->X

You may query the contents of the fields of the supplier record for the related transaction.

Return Values

If the script returns a numeric value this is used as the unit cost price. Returning any other value such as FALSE will result in CAPITAL ignoring the script. The system will then try to resolve the correct price by searching the Supplier Special Price matrix and apply other cost calculations where applicable.

Comments

The script R-SSP.MAC is executed (if it exists) before any Supplier Special Price rules are searched for a match.

generate/notepad2.gifA special cost price applies only when a transaction such as a purchase order or stock receipt is assigned a supplier code. This hook is not called unless a supplier code has been assigned to a transaction, as supplier special price rules are supplier specific.

____________________________

Related Topics:

Customer Special Pricing Hook

Supplier Special Pricing

Scripting Hooks

Script Programming

 



Help Topic Map