When the rules are evaluated
During the monthly salary calculation (Calculate Monthly Salary HAC, Codeunit 70003107), the leave-management codeunit (Leave Mng HAC, Codeunit 70003112) iterates every leave journal entry for the month and applies the matching rules:
Type = Leave Deduction. It appears as a negative line on the payslip preview and reduces the employee’s net pay.
Prerequisites
A deduction rule will only ever apply if the leave plan permits it. Two layers gate the behaviour:- Leave Type Config →
Has Deduction Rules— turn this on for the leave type that should be deductible (e.g. Unpaid Leave). Until this is checked, the Leave Deduction Rules subform on Leave Config is hidden. - Leave Config →
Ability to non-deduct— when ticked, the engine skips the rule entirely for that plan, even if rules are configured. Use this on plans where you want to disable deduction without deleting the rows.
Walkthrough
1. Enable deduction on the leave type
- Open Tell Me → Leave Type Config List.
- Open the leave type (e.g.
UNPAID). - Tick Has Deduction Rules.
- Close.
2. Add rules to the leave plan
- Open Tell Me → Leave Config List.
- Open the leave plan whose deduction profile you want to define.
- Scroll to the Leave Deduction Rules part — it now appears because step 1 enabled it.
- Add one line per salary component to deduct:
The engine enforces one rule per (Leave Config, Salary Type) pair. Trying to add a duplicate raises “A deduction rule for this salary type is already configured for this leave type.”
3. Verify
Run a payslip preview for an employee who has time on the matching leave plan during the period. You should see negativeLeave Deduction lines in the breakdown, one per Salary Type rule.
Banded deductions (From Day / To Day)
TheFrom Day / To Day columns let you scale the percentage by leave duration. Typical setup:
This reads as: “first five days of leave free, days 6–15 deduct 50%, beyond that deduct fully.” Leave both columns at zero if you don’t need banding — the percentage then applies uniformly to every day.
Common pitfalls
Object reference
The standalone
Deduction Setup HAC table (Tab 70003131) is a legacy structure with no page and no consumer in the current codebase. It is reserved for future use and does not affect payroll. The active deduction surface is Leave Deduction Rule HAC as described above.Related pages
- Leave management — leave types, plans, and request flow
- Payroll setup — salary types and the components rules can target
- First-Time Configuration — high-level setup overview

