Back to Playbook
Act 4: Payday — Financial Operations

18. Payroll Run

Payroll Run screen
See it live

Story

Month-end arrives, and Sarah carefully begins the payroll process because even small mistakes could affect employee trust and financial accuracy.

The system now combines attendance, salary structures, overtime, deductions, taxes, loans, and contributions into finalized payouts for every employee.

Happy Path

Payroll is generated, reviewed, approved, and finalized successfully while all salary calculations and deductions are processed automatically.

### Where attendance shows up on a payslip

The month's attendance reaches the payslip as at most three deduction lines, produced by the policy's deduction rules (Chapter 11) rather than by attendance itself.

A rule that is switched off produces no line at all, which is the same thing an employee sees when the rule simply found nothing to deduct. If a deduction looks wrong, the question is which rule produced it — the policy's rule list is where it is answered, not the attendance sheet.

  • Admin starts payroll for the selected month
  • System calculates salary, overtime, deductions, taxes, contributions, and loans automatically
  • Draft payroll is reviewed and adjustments are added if needed
  • Payroll is approved for payout processing
  • Employees are marked as paid and payslips become available
  • Late Deduction — one line for the whole month, combining the late bands and the late marks that added up to a day
  • Absent Deduction — one line covering absent days, days with no attendance recorded, and half of each half day
  • Unpaid Leave Deduction — one line for approved leave whose type is unpaid

Failure Modes

FailureWhat the user seesWhat happens next
Payroll already exists for the selected periodDuplicate payroll run rejectedUse adjustment flow or wait for next payroll cycle
No employees have configured salary structures"Add salary structures first"Configure salary structures before rerunning payroll
Employees missing attendance records or bank detailsEmployees flagged with payroll warningsFix missing information or continue with review
Employee has unapproved overtime entriesOvertime excluded or payroll blocked based on policyApprove overtime before payroll processing
Salary structure effective date starts after payroll periodEmployee excluded from payroll generationCorrect effective dates in a future payroll cycle
Tax or contribution calculation fails for an employeeEmployee payroll record flagged for reviewResolve calculation issue while payroll continues for others
Employee joins or separates during the payroll monthPayroll calculated using prorated salary rulesReview prorated calculations before approval

Edge Cases

ScenarioBehaviorWhy
Payroll includes arrears, bonuses, or reimbursementsAdditional adjustments are included in employee net paySupports consolidated payroll payouts
Employee has active loan installmentsLoan deductions are automatically subtracted from payrollMaintains loan repayment consistency
Employee net pay becomes zero or negative after deductionsPayroll record is flagged for manual reviewPrevents risky or invalid salary payouts
Historical payroll correction is required after finalizationCorrection is handled through manual adjustment in a future payroll cyclePreserves payroll audit integrity
A deduction waiver is granted for one employee for one monthThe late or absence line is never created for that runThe amount is excluded before tax is worked out, rather than deducted and refunded afterwards, so the tax stays correct