No edit summary |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
==Introduction== | ==Introduction== | ||
: To execute a simple commission script to determine the commission rate based on the payment age (Payment Date - Invoice Date). | :1. 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. | :2. '''Sales Commission Script''' module is required. | ||
<br /> | <br /> | ||
Line 12: | Line 12: | ||
==To Create New Commission Script== | ==To Create New Commission Script== | ||
: See the below screemshot. | :1. Click on '''NEW'''. See the below screemshot. | ||
::[[File:Tools-Maintain Commission Script-02.jpg |500px]] | ::[[File:Tools-Maintain Commission Script-02.jpg |500px]] | ||
<br /> | <br /> | ||
Line 28: | Line 28: | ||
|} | |} | ||
<br /> | <br /> | ||
:2. Example of the scripts:<br /> | |||
{| class="mw-collapsible mw-collapsed wikitable" | ::a. '''Script 1''' | ||
::{| class="mw-collapsible mw-collapsed wikitable" | |||
! OnOpen Script | ! OnOpen Script | ||
|- | |- | ||
Line 47: | Line 48: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
<br /> |
Latest revision as of 04:47, 16 March 2018
Menu: Tools | Maintain Commission Script...
Introduction
- 1. To execute a simple commission script to determine the commission rate based on the payment age (Payment Date - Invoice Date).
- 2. 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.
- 2. Example of the scripts:
- a. Script 1
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;