Create a run for a month, check the payslips and LOP, recompute after corrections, process so staff can see their payslips, then lock it.
Finish first: Set up a salary structure and preview the payslip, Mark staff attendance in the monthly grid and set up shifts
You should see: The Payroll list with Month, Status badge (Draft / Processed / Locked), Staff, Gross, Deductions, Net and Processed date, plus TDS by quarter and New payroll run buttons. The demo school shows last month as Processed.
You should see: The dialog explains "Payslips are computed for every active staff member with a salary structure, using attendance for loss of pay." Toast "Run created: 5 payslips" (with "2 staff skipped (no salary structure)" when applicable) and the run page opens with a Draft badge and a blue alert: "Check attendance and LOP, recompute if you change anything, then process."
You should see: Payslip numbers look like PAY/2026-04/000001. LOP days show in orange; a missing bank account shows "no account" in orange.
LOP per person = absent days + 0.5 per half day + approved unpaid-leave (LWP) dates in the month.
You should see: Toast "Payslips recomputed"; the table and totals refresh. Only a draft run can be recomputed.
You should see: Toast "Payroll processed"; the badge turns Processed and the buttons change to Bank advice CSV, Reopen and (for owner/admin/principal) Lock. Staff can now see this month's payslip on My HR.
You should see: Toast "Back to draft"; payslips disappear from My HR until you process again.
You should see: Toast "Payroll locked"; the list shows "Locked <date>". Only Bank advice CSV remains available.
Accountants can create, recompute and process but cannot lock: the Lock button is shown only to owners, admins and principals.
You should see: Toast "Run deleted" and you are back on the Payroll list.