Skip to main content

Pay Runs

Payroll → Pay Runs → All Runs (/runs) — the payroll lifecycle. Each run pays one Pay Group for one Period.

Pay Runs pagePay Runs page
Pay Runs — list with lifecycle actions

Lifecycle​

DRAFT → SYNCED → COMPUTED → APPROVED → PAID
StatusMeaningActions
DRAFTCreated, not yet costed. Delete allowed (releases the period for a corrected schedule)Sync & Compute, Delete
SYNCEDEmployees + attendance + revisions syncedSync & Compute
COMPUTEDCosted — net pay computed per employee, statutory calculatedApprove, Re-compute (after attendance/revision fix)
APPROVEDFinance approvedMark Paid & Close
PAIDClosed — no further actions. Payslips generated—

Transitions are POST /pay-runs/:id/transition (sync-and-compute / approve / mark-paid).

List view (/runs)​

ColumnMeaning
CoderunCode (mono) — suggested as payGroupCode-periodCode
PeriodperiodCode (e.g. 2026-04)
Start / End / Pay DateFrom the pay group's calendar
EmployeestotalEmployees in run
Net PaySum netPay (locale en-IN, 2 decimals)
StatusStatusBadge
ActionsLifecycle buttons (stop-propagation so row click → detail is preserved)
  • New Run (top right, payroll:manage) → PayRunFormPage.
  • Row click → Run Detail (/runs/:id).

New Run form (/runs/new)​

  • Pay Group (select) — who the run pays. Without one, paying "everyone" would include a weekly employee in a monthly run.
  • Year (select year-1 / year / year+1) — scopes usePayPeriodPreview.
  • Period (select) — periods are scheduled by the group's rule (startDate/endDate/payDate). Only periods not yet taken (takenCodes from usePayPeriods where status !== OPEN) and from the chosen group's preview are offered. Dates are derived, not typed.
  • Run Code — auto-suggested as group.code-periodCode until touched; editable. Created via useCreatePayRun → navigates to /runs/:id.

Run Detail (/runs/:id)​

  • Header: runCode · periodCode · payGroup, dates, totals, status.
  • Sync & Compute — queues a background job (jobId). While job.status is PENDING/RUNNING, the button becomes a spinner (Queued… / Computing…) via useJob(jobId) — second submit is disabled to avoid racing. When finished, re-enable for Re-compute (after an attendance correction or adjustment).
  • Approve (COMPUTED → APPROVED) — confirm modal from runActions.ts (RUN_ACTION_COPY).
  • Mark Paid (APPROVED → PAID) — final; closes run. Then review payslips (/runs/:id/payslips) and payment batch (/runs/:id/batch).
  • Employee Lines (/runs/:id/employees/:employeeId) — per-employee breakdown (RunEmployeeLinesPage): component splits, payable days, adjustments applied, statutory.

:::tip Rerun after a fix If HR corrects attendance after COMPUTED, do not edit the run. Open it and click Re-compute (same sync & compute path). The job re-syncs attendance and re-costs statutory against the same revisions. :::