Payroll & Statutory

Payroll & Statutory Settings — Simple Guide (This HRM)

This document explains how salary is calculated in this HRM software, not only textbook HR definitions. It is written in plain English for admins, employees, or anyone new to payroll.

Important: This system pays most staff on attendance (daily or hourly rate × days/hours worked). Statutory amounts (PF, ESI, PT) are then calculated using Salary Components, Statutory Settings, Work State, and PT Slabs.


Table of contents

  1. Big picture — how everything connects
  2. Salary Components
  3. Work States
  4. Statutory Settings
  5. PT Slabs (Professional Tax)
  6. What is on the employee record
  7. Payroll run step-by-step in the software
  8. Worked examples (with numbers)
  9. Payslip — what you will see
  10. Common questions

1. Big picture — how everything connects

Think of payroll as a pipeline:

Employee profile
    ├── Salary Type + Salary Amount (daily or hourly rate)
    ├── Salary Structure (% for Basic, HRA, etc.)
    ├── Work State (for Professional Tax)
    └── Statutory tab (PF / ESI / PT enabled or not)

        ↓  (attendance for the month)

Attendance (present / half / absent / holiday)
        ↓
Attendance Gross  ("Wages" — money earned from days worked)
        ↓
Salary Components (each active line: Basic, HRA, OT, fines, PF, PT…)
        ↓
Total Earnings  −  Total Deductions  =  Net Pay (Take-home)
        ↓
Payslip (PDF / view)

In the admin menu, the setup order is usually:

Step Where in HRM Purpose
1 Payroll → Salary Components Define earning/deduction lines and formulas
2 Payroll → Statutory Settings PF & ESI percentages and ceilings (company-wide)
3 Payroll → Work States States where employees work (for PT)
4 Payroll → PT Slabs PT amount by salary range per state
5 Employees → Add/Edit Rate, structure, work state, enable PF/PT/ESI
6 Attendance Check-in/out or biometric
7 Payroll → Run Payroll Generate draft, then Finalize
8 Payslip Employee/admin view
flowchart TD
  emp[Employee record]
  att[Monthly attendance]
  ag[Attendance gross]
  comp[Salary components in sort order]
  earn[Total earnings]
  ded[Total deductions]
  net[Net pay]
  slip[Payslip]

  emp --> att
  att --> ag
  ag --> comp
  comp --> earn
  comp --> ded
  earn --> net
  ded --> net
  net --> slip

2. Salary Components

What is a salary component?

A salary component is one line on the payslip: for example “Basic Salary”, “HRA”, “PF (Employee)”, or “Professional Tax”.

Each component has:

Field Meaning
Code Short ID (e.g. BASIC, HRA, PF_EE)
Name Label on payslip
Type earning, deduction, or employer_contribution
Calc type How the amount is calculated (see below)
Default value Default % or amount (employee can override on profile)
Sort order Processing order in payroll

Earning → adds to Total Earnings (Gross Pay on payslip)
Deduction → subtracted from earnings → Net Pay
Employer contribution → company cost (shown on payslip/statutory reports; not deducted from employee net pay)

Calc types used in this HRM

Calc type Simple meaning
attendance_gross Wages from attendance: daily rate × present days (+ half days at half rate), or hourly rate × hours
percent_of_gross X% of attendance gross (e.g. Basic = 50% of gross)
percent_of_basic X% of Basic amount already calculated (e.g. HRA = 40% of Basic)
percent_of_component X% of another component you select
fixed / fixed_prorated Fixed rupee amount (pro-rated by attendance factor if configured)
overtime OT hours in month × employee OT rate per hour
statutory_pf_ee Employee PF: % of Basic, capped by PF wage ceiling
statutory_pf_er Employer PF: same base, employer %
statutory_esi_ee Employee ESI: % of attendance gross (only if gross ≤ ESI ceiling)
statutory_esi_er Employer ESI
statutory_pt Professional Tax from PT Slabs + employee Work State
lop_fine Fines for absent / half days (from employee fine settings)
manual Fixed amount stored per employee (e.g. TDS amount)

Common components (typical setup)

Code (example) Name Type Role
WAGES Wages / Attendance Gross earning Pay for days/hours actually worked
BASIC Basic Salary earning Often 50% of attendance gross (configurable)
HRA House Rent Allowance earning Often 40% of Basic
OT Overtime earning Extra hours after scheduled checkout
EXP_REIMB Expense Reimbursement earning Approved expense claims for that month
PF_EE PF (Employee) deduction 12% of Basic (capped) — from employee salary
PF_ER PF (Employer) employer_contribution Employer’s PF share
ESI_EE / ESI_ER ESI deduction / employer Only if enabled and gross ≤ ceiling
PT Professional Tax deduction State tax via slabs
LOP_FINE Loss of Pay Fine deduction Absence penalties
TDS Tax Deducted at Source deduction Manual fixed amount if enabled per employee

Gross, CTC, and take-home in this software

Term In this HRM
Attendance gross Money for attendance before component breakdown (attendance_gross field on payroll)
Gross Pay (A) on payslip Sum of all earning components (Wages + Basic + HRA + OT + reimbursements, etc.)
Total Deductions (B) Sum of deduction components (PF, PT, ESI, LOP, TDS, …)
Net Pay (Take-home) Gross Pay (A) − Deductions (B)
CTC (cost to company) Not a single stored field; roughly employer_cost on payroll (includes employer PF/ESI + earnings)

Note: If you use both WAGES (full attendance pay) and Basic/HRA as separate earnings, all of them add up in Gross Pay. That matches how this software is built. Your HR policy should match the components you enable (some companies use only WAGES; others use WAGES + Basic/HRA for reporting).

How to configure a salary component (admin)

  1. Go to Payroll → Salary Components → Add.
  2. Set Code, Name, Type, Calc type, Default value, Sort order.
  3. For % of Basic, set calc type percent_of_basic and default 40 for 40%.
  4. Keep Active checked.
  5. On each employee, open Salary tab and enter structure values (% or enable statutory checkboxes on Statutory tab).

3. Work States

What is a Work State?

A Work State is the Indian state where the employee is considered employed for payroll (e.g. Maharashtra, Karnataka). It is not the same as present address — it is the state used for Professional Tax.

Why it matters

  • Professional Tax (PT) rules differ by state.
  • This HRM does not auto-load government PT tables; you enter PT Slabs per work state.
  • On payroll, PT is calculated only if:
    • Employee has a Work State selected, and
    • PT salary component is enabled for that employee (Statutory tab checkbox).

How to set up

  1. Payroll → Work States — add state_code (e.g. MH) and state_name (e.g. Maharashtra).
  2. Employees → Statutory tab — choose Work State (for PT).

Example

Employee Office location Work State in HRM PT
A Mumbai Maharashtra Uses MH PT slabs
B Bengaluru Karnataka Uses KA PT slabs you configured
C Remote, no state set (empty) PT = ₹0 (no slab match)

4. Statutory Settings

Menu: Payroll → Statutory Settings

These are company-wide defaults for PF and ESI. PT amounts come from PT Slabs, not from this screen.

Setting Default (example) Meaning
PF Employee Rate (%) 12 Deducted from employee salary
PF Employer Rate (%) 12 Paid by company (employer contribution line)
PF Wage Ceiling (₹) 15,000 PF is calculated on Basic, but Basic for PF is capped at this amount
ESI Employee Rate (%) 0.75 Deducted if ESI applies
ESI Employer Rate (%) 3.25 Employer share
ESI Gross Ceiling (₹) 21,000 ESI applies only if attendance gross ≤ this
Basic % of Gross 50 Reference / planning; employee Basic % is set on salary structure

Who pays what?

Item Deducted from employee? Paid by employer? Enabled how?
PF (employee) Yes — Statutory tab: PF_EE checked
PF (employer) No Yes (employer_cost) Statutory tab: PF_ER checked
ESI (employee) Yes, if gross ≤ ceiling — ESI_EE checked
ESI (employer) No Yes ESI_ER checked
Professional Tax Yes — PT checked + Work State + PT Slabs
TDS Yes — TDS component + manual amount on employee
LWF (Labour Welfare Fund) — — Not built into this HRM; add manually if needed

PF calculation (as coded)

  1. Compute Basic earning (e.g. 50% of attendance gross).
  2. PF base = smaller of (Basic, PF Wage Ceiling).
  3. PF (employee) = PF base × PF Employee Rate ÷ 100.
  4. PF (employer) = same base × PF Employer Rate ÷ 100.

Example: Basic = ₹8,000, ceiling ₹15,000, rate 12%
→ PF = 8,000 × 12% = ₹960 (employee and employer each, if both enabled).

ESI calculation (as coded)

  • Only if employee has ESI_EE enabled and attendance gross ≤ ESI Gross Ceiling.
  • ESI (employee) = attendance gross × ESI employee rate.
  • ESI (employer) = attendance gross × ESI employer rate.

Example: Attendance gross ₹18,000, ceiling ₹21,000, ESI EE 0.75%
→ ESI = 18,000 × 0.0075 = ₹135.


5. PT Slabs (Professional Tax)

What is Professional Tax?

A state-level tax on salaried workers. Amount depends on state and salary range.

PT Slabs in this HRM

Menu: Payroll → PT Slabs

Each slab row has:

Field Meaning
Work State Which state this slab belongs to
Min Gross / Max Gross Salary range (uses attendance gross for the month)
PT Amount Rupees to deduct for that range
Frequency monthly, half_yearly, or yearly
Applicable month(s) For half-yearly/yearly, e.g. 2,8 for Feb and Aug

How the system picks PT

When payroll runs statutory_pt for an employee:

  1. Read employee Work State.
  2. Take attendance gross for that month.
  3. Find a slab where: min_gross ≤ attendance_gross ≤ max_gross for that state.
  4. If frequency is not monthly, deduct only in listed months.
  5. If no slab matches → PT = ₹0.

Connection: Work State ↔ PT Slabs

Employee.work_state_id  →  work_states (e.g. Maharashtra)
                              ↓
                         pt_slabs filtered by work_state_id
                              ↓
                         PT amount for this month's attendance gross

Example slabs (Maharashtra — illustrative)

Min gross Max gross PT amount Frequency
0 7,500 0 monthly
7,501 10,000 175 monthly
10,001 999,999 200 monthly

Employee with attendance gross ₹12,000 in MH → PT = ₹200 (if PT component enabled).


6. What is on the employee record

Salary tab

Field Meaning
Salary Type daily or hourly
Salary Amount ₹ per day or ₹ per hour
Min Work Hours Full “present” day expected hours
OT Rate per Hour Paid for each full OT hour after scheduled checkout
Full/Half Day Absence Fine Used by lop_fine deduction
Salary Structure Percentages for Basic, HRA, etc.

Daily example: Rate ₹500/day, 22 present days, no half days
→ Attendance gross = 22 × 500 = ₹11,000.

Statutory tab

Field Meaning
Work State For PT
PAN, UAN, ESI number Shown on payslip; numbers for compliance
Statutory component checkboxes Turn PF, ESI, PT on/off for this person

7. Payroll run step-by-step in the software

  1. Attendance for the month is complete (present/half/absent).
  2. Payroll → Run Payroll — choose month/year → Generate Payroll (draft).
  3. System for each active employee:
    • Reads attendance summary.
    • Computes attendance gross.
    • Loops active salary components (sort order).
    • Adds approved expense claims (expense date in that month) as Expense Reimbursement.
    • Stores lines in payroll_item_lines.
  4. Review Payroll Report; adjust attendance if needed; Regenerate if draft.
  5. Finalize payroll — employees can see payslips.
  6. Revert to draft / Delete run — expense claims unlink and can be included again.

8. Worked examples (with numbers)

Assumptions used in all examples:

  • Statutory settings: PF 12%, ceiling ₹15,000; ESI 0.75% / 3.25%, ceiling ₹21,000.
  • Components: WAGES (attendance_gross), BASIC 50% of gross, HRA 40% of Basic, PF_EE, PF_ER, PT enabled.
  • Maharashtra PT slab: gross ₹0–999,999 → ₹200/month.
  • No overtime, no expense claims, no LOP fines unless stated.

Example 1 — Daily worker, full attendance (22 days)

Employee: Daily rate ₹500, 22 present days, Work State Maharashtra, PF + PT on.

Step Calculation Amount (₹)
Attendance gross 22 × 500 11,000
WAGES (earning) = attendance gross 11,000
Basic (50% of gross) 50% × 11,000 5,500
HRA (40% of Basic) 40% × 5,500 2,200
Gross Pay (A) 11,000 + 5,500 + 2,200 18,700
PF employee (12% × min(5500, 15000)) 12% × 5,500 660
PT (MH slab) 200
Total deductions (B) 860
Net pay 18,700 − 860 17,840
PF employer (for company cost) 12% × 5,500 660

Example 2 — Same worker, 2 absent days (LOP fines)

Employee: ₹500/day, 20 present, 2 absent, full-day fine ₹500 each.

Step Amount (₹)
Attendance gross 20 × 500 = 10,000
Basic 5,000
HRA 2,000
Gross Pay (A) 10,000 + 5,000 + 2,000 = 17,000
PF employee 12% × 5,000 = 600
PT 200
LOP fine 2 × 500 = 1,000
Net pay 17,000 − 600 − 200 − 1,000 = 15,200

Example 3 — ESI applicable (lower wage)

Employee: ₹600/day, 26 present days → attendance gross ₹15,600 (under ESI ceiling ₹21,000). ESI enabled.

Step Amount (₹)
Attendance gross 15,600
Basic (50%) 7,800
HRA (40% of Basic) 3,120
Gross Pay (A) 15,600 + 7,800 + 3,120 = 26,520
PF employee 12% × 7,800 = 936
ESI employee 0.75% × 15,600 = 117
PT 200
Net pay 26,520 − 936 − 117 − 200 = 25,267
ESI employer (company) 3.25% × 15,600 = 507

Example 4 — Overtime + higher daily rate

Employee: ₹800/day, 24 present days, 1 OT hour in month, OT rate ₹200/hr.

Step Amount (₹)
Attendance gross 24 × 800 = 19,200
OT earning 1 × 200 = 200
Basic 9,600
HRA 3,840
Gross Pay (A) 19,200 + 200 + 9,600 + 3,840 = 32,840
PF employee 12% × 9,600 = 1,152
PT 200
Net pay 32,840 − 1,152 − 200 = 31,488

(OT is counted only for full hours worked after the employee’s scheduled check-out time.)


Example 5 — Expense reimbursement on payslip

Employee: Same as Example 1 (net would be ₹17,840), plus approved expense claim ₹1,500 with expense date in the payroll month.

Step Amount (₹)
Gross Pay before claim 18,700
Expense Reimbursement (EXP_REIMB) +1,500
Gross Pay (A) 20,200
Deductions (unchanged) 860
Net pay 19,340

Payslip also shows a table Expense Claims (Reimbursement) with the claim details.


9. Payslip — what you will see

Typical sections:

  1. Employee details — name, code, bank, PAN, UAN
  2. Attendance summary — present, LOP, paid days, OT hours
  3. Expense claims — if any were paid this run
  4. Earnings | Deductions — each component and amount
  5. Gross Pay (A), Total Deductions (B), Net Pay (A − B)

Employer PF/ESI appear as employer_contribution lines (company cost), not as money taken from the employee’s net pay.


10. Common questions

Q: Why is my Gross Pay higher than attendance gross?
A: Because Gross Pay sums all earning components (Wages + Basic + HRA + OT + …). Review which components are active.

Q: PT is zero on payslip.
A: Check: Work State set? PT component enabled on employee? PT slab exists for that state and salary range?

Q: PF is zero.
A: PF_EE not enabled on employee Statutory tab, or Basic is zero.

Q: Where is CTC entered?
A: There is no separate CTC field; use salary rate + components. Employer cost on payroll report approximates company cost.

Q: LWF / full income tax?
A: LWF is not automated. TDS can be a manual deduction component with a fixed amount per employee if your CA advises.

Q: Monthly fixed salary (not daily)?
A: This product is built around daily/hourly attendance gross. For fixed monthly pay, many admins set a daily rate ≈ monthly ÷ working days, or use fixed components — discuss with your implementer.


Quick reference — files in the codebase

Topic Main logic
Payroll calculation includes/payroll_helper.php
Payslip display includes/payslip_helper.php
Component setup UI salary_component_form.php
Statutory UI statutory_settings.php
PT slabs UI pt_slab_form.php
Employee structure includes/employee_form.inc.php

Document version: aligned with this HRM codebase (attendance-based payroll, PF/ESI/PT, expense reimbursement on payslip).