Compensation + EOSB — bank, allowances, deductions, IAS 19
Four sub-tabs covering everything pay-related: bank accounts (with WPS-eligible primary), allowances (10 types × monthly/annual/one-off), deductions (loans + advances + penalties + PASI), salary-revision history (append-only), EOSB calculator implementing Oman Labour Law Art. 39 with monthly snapshot cron.
The 4 sub-tabs
Bank accounts
Employees may have multiple bank accounts (primary salary + secondary for transfers home). Fields:
- bank_name · account_holder_name · account_number · iban (light validation 15-34 chars alphanumeric) · swift_code
- currency_code — usually OMR
- is_primary — only one per employee; auto-demote others on save
- is_wps_eligible — drives WPS SIF inclusion (must be Oman bank for WPS)
- status — active / closed
Allowances (10 types)
| Type | Frequency | Taxable / PASI |
|---|---|---|
| Housing | Monthly | PASI subject (Omani only) |
| Transport | Monthly | Not PASI |
| Communication | Monthly | Not PASI |
| Education | Annual | Not PASI |
| Fuel | Monthly | Not PASI |
| Meal | Monthly | Not PASI |
| Special | Monthly / one-off | Configurable |
| Overtime | Monthly | Configurable |
| Bonus | One-off / annual | Configurable |
| Other | Configurable | Configurable |
Deductions
Active deductions reduce monthly net pay. Loan-style deductions track principal + balance so the employee's debt is visible:
- Salary advance · monthly installment · auto-completes when balance = 0
- Staff loan · principal + monthly installment + balance · for big-ticket items
- Penalty · disciplinary deduction (linked to disciplinary_actions row)
- Garnishment · court-ordered
- Medical / asset damage / PASI / income tax · contextual
Salary revision history (append-only)
Every salary change creates a row in employee_salary_history:
- effective_date · old_basic · new_basic · auto-computed % change · reason · approver
- Reasons: annual_increment / promotion / role_change / market_correction / cost_of_living / demotion / correction
- Append-only by policy — even an admin can't delete. Drives audit trail + EOSB recomputation.
CompensationService::recordSalaryRevision()auto-updatesemployees.basic_salaryif effective_date is today or earlier
EOSB — the calculator
End of Service Benefit per Oman Labour Law Art. 39:
- First 3 years of service: 15 days basic salary per year
- After 3 years: 30 days basic salary per year (pro-rated daily)
- Daily rate: basic ÷ 30 (configurable per
m13.eosb.daily_rate_divisor) - Trigger: end of service (resignation, termination, retirement, death)
Worked example
Monthly snapshot cron
bin/cron-m13-eosb-accrual.php runs on the last day of every month at 23:30. For each active employee:
- Compute EOSB at end-of-month
- Insert / update row in
employee_eosb_accrualsfor (employee × period_year × period_month) - UNIQUE constraint = idempotent on re-run
- Audit-log entry
The cumulative accrued amount is the firm's IAS 19 provision liability. Roll-up across all active employees = the total provision shown on SFP. Audit firms that don't accrue monthly get a lumpy December P&L hit.
Step-by-step — record a salary revision
Open employee → Salary History tab
Existing revisions in reverse-chronological order with colour-coded % column (green for increase, red for decrease).
Click "+ Record revision"
Form: effective_date · new_basic · reason · approver_id (employee picker, must be partner).
System captures old_basic + computes %
old_basic auto-pulled from current
employees.basic_salary. Δ% computed. Append to history. If effective today or earlier,employees.basic_salaryupdated live.EOSB recomputes on next month-end
The EOSB cron uses the live basic_salary, so the snapshot reflects the new rate going forward. Past months' snapshots are immutable.
Open HR → Employee → EOSB tab. The hero card shows: Years of Service · Days Accrued · Daily Rate · Accrued Amount. The two-band formula is laid out below with the actual numbers. Click Recompute to refresh after a salary revision.
Salary history is append-only by policy. If you mistakenly entered the wrong figure, post a correction revision (reason = "correction") with the right value, not a delete. The audit log preserves both events. If you really need to expunge a row, only super_admin via DB-level intervention — and that gets captured in M16 vault audit log.
WPS (Wage Protection System) requires salary deposit into an Oman-licensed bank's local account. Before marking is_wps_eligible=1, confirm the bank is on MOLP's list. Foreign banks (e.g. ICICI, HSBC) without an Oman branch are NOT WPS-eligible.