End of Service Benefit (ESB) — Procedure
Module: HRM > End of Service Benefit (/HRM/esb.php)
Permission: HR_PAYSLIP
Related: GL / Accounting Articles Reference, Leave Encashment Procedure
1. What it does
ESB (also called End-of-Service / gratuity / severance) computes and settles an employee's final benefit when they leave. In one transaction it:
- calculates the statutory benefit (country-specific rule),
- rolls in any pending leave-encashment carry-forward and clears that liability,
- recovers outstanding loans and employee advances,
- adds pending reimbursements, and
- raises the net ESB Payable, optionally paying it from a bank in the same step.
Only one ESB can be processed per employee. After processing, the form shows the Processed ESB summary instead of the calculation.
2. Before you start (one-time setup)
HRM > Settings
| Setting | Pref | Notes |
|---|---|---|
| ESB Country | esb_country | Drives the calculation formula (see §5). |
| ESB based on Basic vs Gross | esb_salary | If set, uses last paid Basic; otherwise last paid Gross. |
| Country params | e.g. Botswana: botswana_severance, qualifying_years (def. 5), severance_weeks | Per-country options. |
| Leave Encashment Payable | leave_encashment_payable_account | Used to clear the carry-forward rolled into ESB. |
Admin > GL Setup
| Setting | Pref |
|---|---|
| ESB / Encashment Round Off Account | esb_encash_round_off_act (falls back to employee_benefit_expenses 4510, then the selected GL account) |
| Salary Payable | dflt_salary_payable |
| Loan Payable | dflt_loan_payable |
| Reimbursement Claimable | dflt_reimbursement_claim |
Employee record — critical: a leaver (status ≠ Active) must have the Termination / Status-change date set. Without it the benefit would compute against a zero service period, so the system blocks processing and warns you to update the employee first.
3. Step-by-step
- Open HRM > End of Service Benefit.
- Select Department and Employee.
- Review the Employee Information panel:
- Reference, Employee Name, Status, Credit balance,
- Service Period (Years / Months / Days), Last Payslip Date, Actual Termination Date, Notice Period.
- If the termination date is missing, a warning appears and the Process button is hidden — fix the employee record and return.
- Review the Calculations panel:
- Last Paid Basic/Gross, Calculated EOSB, Loan Balance,
- Leave Encashment carry-forward rows (FIFO) + Total Outstanding Leave Encashment,
- Pending Reimbursements,
- Payable EOSB After Deductions =
EOSB + carry-forward − loan − outstanding advance. - If the employee has pending carry-forward leave, a note confirms it will be settled within this ESB.
- In Settlement:
- Payable ESB (read-only), Round Off (click the spinner to refresh), Total.
- GL Account — the ESB Payable liability account this benefit is credited to.
- Bank Account *(optional)* — choose one to pay the ESB immediately.
- If the employee instead has an advance balance owing to the company, the form shows Employee Advance Balance, a Deposit to Bank Account, and a Return Amount field (to collect the refund).
- Comments.
- Click Process ESB.
- After processing, view the GL and Print the ESB statement (report rep813).
4. Accounting impact (summary)
A complete ESB raises (signs: DR positive / CR negative):
| Line | Dr/Cr | Account |
|---|---|---|
| ESB expense (incremental) | DR | ESB Expense |
| Carry-forward cleared | DR | Leave Encashment Payable |
| Pending reimbursement | DR | Reimbursement Claim |
| Loan recovered | CR | Loan Payable |
| Employee advance / balance | DR/CR | Salary Payable |
| Round off | DR/CR | Round-off account |
| ESB Payable (total) | CR | selected GL account |
| (if paid by bank) | DR ESB Payable / CR Bank |
Live sample (employee #22, txn #131): DR Round Off 0.28, DR Leave Encashment Payable 6,670 (carry-forward), DR Reimbursement 500, CR Loan 500, DR Employee Balance 448.72, CR ESB Payable 7,119 — balances to 7,619 each side. A simpler one (employee #27, txn #137): DR ESB Expense 1,200 + DR Leave Encashment Payable 1,800 / CR ESB Payable 3,000. Full breakdown in the GL reference.
5. How the benefit is calculated (by country)
The amount comes from the per-country add_esob_cal rule using years of service and the last paid salary (Basic or Gross per esb_salary):
- Botswana (
esb_country=BWA): severance pay, only if service ≥qualifying_years(default 5).eligible_years = floor(years) − qualifying_years + 1;weekly = monthly ÷ 4;gross severance = eligible_years × weekly × severance_weeks; then severance tax is deducted → net. (Fallback when disabled:salary × years × 0.1.) - Bahrain (BHR): first 3 years × ½ month salary + remaining years × 1 month.
- Saudi (SAU): tiered by service and whether resigned vs terminated.
- India (IND): tiered by years — `<1y`: 2× · `<5y`: 6× · `<11y`: 12× · `<20y`: 20× · `>20y`:
(months × 6) + (days × 33)of salary.
Only employees marked Resigned / Terminated / Deceased produce a benefit in the Gulf/India rules.
6. Rules & gotchas
- One ESB per employee (re-opening shows the Processed ESB summary).
- Termination/status-change date must be set for non-active employees.
- Pending leave-encashment carry-forward is automatically settled inside ESB — you don't run a separate encashment for it.
- The expense booked here is incremental (total benefit minus the carry-forward already sitting in Leave Encashment Payable), so the journal stays balanced and the liability is not double-counted.
- Consider configuring a dedicated ESB Payable account for the *GL Account* field so the payable is not shared with the salary-payable/expense account.
