Skip to main content

Documentation Index

Fetch the complete documentation index at: https://human-resource-docs.ha-consultancy.com/llms.txt

Use this file to discover all available pages before exploring further.

Leave Deduction Rules let you say “when an employee is on this type of leave, deduct N% from this specific salary component for every day of leave taken.” A common use is: when on Unpaid Leave, deduct 100% of Basic Salary and 100% of Transportation Allowance, but leave Housing Allowance intact. Rules are configured per Leave Config (per leave plan, not per leave type) — so the same leave type can have different deduction profiles for different employee tiers.

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:
deduction = Salary Component Amount × (Deduction Percentage / 100) × Number of Days on Leave
The deduction is added to the Salary Employee Breakdown with 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:
  1. 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.
  2. 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

  1. Open Tell MeLeave Type Config List.
  2. Open the leave type (e.g. UNPAID).
  3. Tick Has Deduction Rules.
  4. Close.

2. Add rules to the leave plan

  1. Open Tell MeLeave Config List.
  2. Open the leave plan whose deduction profile you want to define.
  3. Scroll to the Leave Deduction Rules part — it now appears because step 1 enabled it.
  4. Add one line per salary component to deduct:
FieldNotes
Salary TypeA value from your Salary Type list (e.g. Basic Salary, Transportation Allowances). Must exist or insertion fails.
Deduction PercentageA decimal between 0 and 100. 100 means deduct the full daily share of that component for each day on leave.
From Day / To DayOptional banded percentages — see below.
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 negative Leave Deduction lines in the breakdown, one per Salary Type rule.

Banded deductions (From Day / To Day)

The From Day / To Day columns let you scale the percentage by leave duration. Typical setup:
From DayTo DayDeduction Percentage
150
61550
16999100
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

SymptomCause
The Leave Deduction Rules section is invisible on Leave ConfigHas Deduction Rules is off on the parent Leave Type Config
Rules exist but no deduction appears on the payslipAbility to non-deduct is ticked on the Leave Config, or the salary package has no item matching the Salary Type in the rule
”The selected salary type does not exist.”The Salary Type entered isn’t in Salary Type List — open Salary Type List and add it first
Deduction is twice what you expectA rule exists for both the leave plan and the leave type independently — review the subform for the active plan

Object reference

ObjectIDNotes
Table Leave Deduction Rule HAC70003148Stores the rules; PK = Leave Config Code + No.
Table Leave Type Config HAC70003123Field 4 — Has Deduction Rules — is the master switch
Table Leave Config HAC70003124Owns the rules via the subform; Ability to non-deduct overrides them
Page Leave Ded. Rule Subform HAC70003141The subform shown inside Leave Config
Codeunit Leave Mng HAC70003112Validates rules on insert and evaluates them in CalculateLeaveDeduction
Codeunit Calculate Monthly Salary HAC70003107Calls into Leave Mng HAC during payslip generation
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.