Payroll
Running payroll
Money as whole paisa, the draft, calculate, lock and paid flow, and why a locked run can never be edited.
Money is a whole number, always
Every amount in this product is stored as an integer number of paisa, never a float. SQLite has no true decimal type, and a payroll product that lets rounding drift is a payroll product that eventually cannot explain itself to an employee. A payslip's line items always sum to its total exactly; one rupee of unexplained difference is the fastest way to lose a team's trust, so the arithmetic is built never to allow it.
The four states of a run
A payroll run moves through the same four stages every month:
- Draft. The run exists but nothing is final. Figures can still change as attendance, leave and loan data settles.
- Calculated. The run has been run against every employee's current attendance, leave, salary structure and standing rules (grace periods, loan instalments, bonus conditions) and produced a real, inspectable number for each person. A draft can be recalculated as many times as needed; nothing is committed yet.
- Locked. The run is finalised. Its figures are what was agreed, and from this point on it is immutable: nothing in this product edits a locked run, ever.
- Paid. The run has been marked paid, its final state.
Why a locked run can never be edited
A payslip someone already has on paper, or has already read on their phone, should never quietly disagree with what the system says today. So once a run is locked, a correction is never a silent edit to it: it becomes arrears or an adjustment carried into the next run, on the record, with its own audit trail. Every run also stores a snapshot of the inputs it was calculated from, so the exact same payslip regenerates identically if anyone looks at it again three years from now.
What feeds a run
A salary structure is a fixed Basic plus allowances, usually expressed as a percentage of Basic rather than of gross (house rent at 45%, utilities at 10%, and so on), which is how Pakistani structures are nearly always written. Attendance and approved leave for the period determine payable days, and standing rules (grace periods, half-day and absence thresholds, active loan instalments) draft their own adjustments onto the run when it is calculated, so nothing has to be entered twice.
Statutory deductions
EOBI, and PESSI or SESSI depending on the branch's province, are versioned platform configuration, published once and applied to every company, because these are Finance Act figures, not something any one company should be able to edit. Income tax withholding is projected against the July to June fiscal year, not simply the month's figure multiplied by twelve, because that is how the actual annual liability is meant to be estimated.
See Settings that matter for the payroll settings a company does control: the pay cycle, rounding, and whether overtime is paid.