Rule packages, elements and rules
Build a versioned set of pay elements and rules, get it approved by another person, and release a new version.
Required permission: payroll.configure (build), payroll.rules_approve (approve)
Before you begin
- You hold payroll.configure. A different person holds payroll.rules_approve; the author cannot approve: 'A rule package is approved by somebody other than its author.'
- You have the ledger account codes for earnings, deductions, employer costs, their liabilities and net pay, and the legal source for the rules.
Steps
Create the package
- Go to Payroll > Configuration > Rule packages and click New package.
- Enter Code (up to 30 characters). A code that already exists becomes the next version.
- Enter Name, Effective from, the Legal source reference and the Net pay ledger account.
- Choose Part-month basis: Calendar days of the period, or Fixed number of days with Days in the basis (for example 30).
- Create the draft. The record lists "Before it can be approved" items.
Add pay elements
- Click Add element.
- Enter Code (for example
FOOD), Name and Type: Earning, Deduction or Employer cost. - Enter the Ledger account. Employer cost elements also need the Liability account.
- Tick prorate if the amount is multiplied by the part-month factor. The taxable and contributory flags are labels only today.
- Save.
Add rules
- Click Add rule.
- Choose the Element code, which must already be in the package.
- Choose the Calculation: Fixed amount, Percent of another element, Percent of gross so far, or Approved hours x multiplier. Nothing else is supported; there is no free-form formula.
- Enter the Order. A rule that is a percent of another element must come after the rule that produces its base.
- Enter the parameters: Amount, Percent, Base element, Multiplier, Hours per month (divisor), and optional Cap and Floor.
- Save.
Approve
- A person with payroll.rules_approve, other than the author, opens the package and clicks Approve package.
- The package is frozen and its content hash is recorded.
What happens next
- A run uses the approved version in force on the period's last day. If the content no longer matches its hash, the system refuses to use it.
- Worked example (DEMO package): BASIC 10,000, HOUSING 4,000 and TRANSPORT 1,000 give gross 15,000.00. A rule of 2 % of gross with a cap of 500 gives 300.00. Net is 14,700.00. An employer cost of 3 % gives 450.00, shown separately and not subtracted from net. Overtime: hourly rate 10,000 / 240 = 41.666667, times 10 hours times 1.5 gives 625.00.
- Amounts are rounded half up to 2 places unless the package says otherwise.
Changing an approved package
- Click New version. A draft copy is made, effective from today if the old version has no end date.
- Edit, then ask another person to approve.
- Approval is refused while the old version still covers the dates: 'Version 1 is still in force over these dates. Close its end date first.' Closing the end date is not available on the screen; ask your implementation team.
Good to know
- Approval checks are listed before you approve and again in the refusal 'The package cannot be approved yet.' They include: an element without a ledger account, an employer cost without a liability account, a negative percent, a floor above its cap, a divisor or multiplier of zero, a rule that refers to itself, or order that is not acyclic.
- An approved package cannot change: 'An approved package is immutable. Create a new version to change it.'
- Rounding, variance limit, country and Arabic name exist on the package but are not editable on the screen after creation.
- The variance limit (default 10 %) is the net-pay movement against the prior posted run that raises a review exception.
- Install DEMO package creates a labelled test package with 17 elements and 5 rules, for test companies only.