(Created page with "''Menu: Tools | Maintain Commission Script...'' ==Introduction== : To execute a simple commission script to determine the commission rate based on the payment age (Payment Da...") |
No edit summary |
||
Line 28: | Line 28: | ||
|} | |} | ||
<br /> | <br /> | ||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! OnOpen Script | |||
|- | |||
| | |||
<syntaxhighlight lang="delphi"> | |||
procedure CalculateCommission(AKODocAmt, AAge: variant; var Value: variant); | |||
begin | |||
if AAge < 10 then | |||
Value := AKODocAmt * 0.05 | |||
else if AAge < 20 then | |||
Value := AKODocAmt * 0.03 | |||
else if AAge < 30 then | |||
Value := AKODocAmt * 0.02 | |||
else | |||
Value := AKODocAmt * 0.005; | |||
end; | |||
</syntaxhighlight> | |||
|} |
Revision as of 09:24, 19 January 2016
Menu: Tools | Maintain Commission Script...
Introduction
- To execute a simple commission script to determine the commission rate based on the payment age (Payment Date - Invoice Date).
- Sales Commission Script module is required.
Maintain Commission Script
To Create New Commission Script
Field Name Explanation Code Input the new code. Description Input the commission script description. Script Load the commission script.
OnOpen Script |
---|
procedure CalculateCommission(AKODocAmt, AAge: variant; var Value: variant);
begin
if AAge < 10 then
Value := AKODocAmt * 0.05
else if AAge < 20 then
Value := AKODocAmt * 0.03
else if AAge < 30 then
Value := AKODocAmt * 0.02
else
Value := AKODocAmt * 0.005;
end;
|