Skip to main content

Attend to pay: the monthly cycle

Modules ATT, LVE, PAY, CLM, NTF, RPT · Release R1 · Specs Attendance, Leave, Payroll

Context​

The reference product's strongest idea is the attendance → leave → payroll chain that turns punches into payable days [Observed] (see Spryple analysis §5, §6, §7 and §16). It has no documented period lock or run lifecycle [Inferred]. Spyrl keeps the chain and adds a lock on each side: the attendance period lock freezes inputs, and the pay-run lock freezes outputs. Anything that changes after a lock becomes an input to the next cycle.

The example below uses an October pay month with an attendance cut-off on the 25th (window 26 September to 25 October), salary paid on the last working day, and a calendar salary basis.

Calendar of typical dates​

Statutory due dates are examples to verify each year and per state; the product reads them from the statutory pack.

Date (example)MilestoneOwnerModule
1 to 25 OctDaily punches, requests and approvals; day computation runs continuouslyEmployees, managersATT, LVE
20 OctReminder: pending requests and missed punches for the windowSystemNTF
22 OctPayroll inputs due: variable pay, arrears, deductions, approved claims cut-offpayroll_managerPAY, CLM
25 OctAttendance window closes—ATT
26 OctAttendance pre-lock check; managers clear blockershr_manager, line_managerATT
27 OctAttendance period locked; att.period.lockedhr_managerATT
27 OctPay run created and calculatedpayroll_managerPAY
28 OctReview: warnings, variance, holds; recalculate as neededpayroll_managerPAY
29 OctRun approved (different person from the preparer)finance_adminPAY
30 OctRun locked; payslips generated; bank file generated and uploadedpayroll_managerPAY
31 OctSalary credited; bank confirmation; payslips publishedpayroll_managerPAY, NTF
7 NovTDS deposit for October (example due date)finance_adminPAY
15 NovEPF ECR upload and payment; ESIC contribution (example due dates)payroll_managerPAY
State datesPT and LWF per state rulespayroll_managerPAY
26 Oct to 25 NovNext window; post-lock changes queued as adjustments—ATT, PAY

Diagram​

Steps​

#ActorActionSystem responseModuleNotifications
1SystemSends reminders five days before cut-offLists of pending requests and days needing action per manager and employeeATT, NTFPush and email to employees and managers
2payroll_managerEnters or uploads one-time inputspay_input rows; approved claims and encashments arrive automaticallyPAY, CLM, LVE—
3hr_managerStarts the attendance lockPre-lock check: pending requests, missed punches, unmapped biometric users, unprocessed importsATT—
4line_managerClears blockers (approve or reject, regularize)Days recomputedATT, NTFTask reminders
5hr_managerLocks (or overrides blockers with a reason)Days Locked; att.period.lockedATTPayroll manager notified
6payroll_managerCreates and calculates the runSnapshot built per employee: compensation, payable days, inputs, statutory versions, declarations; engine runs gross to netPAYPreparer notified on completion
7payroll_managerReviews warnings and variance; holds employees; fixes inputsRecalculation of affected employees only (input hash)PAY—
8payroll_managerSubmits for approvalRun InReview; approver taskPAY, NTFTask to approver
9finance_adminApprovesRun Approved; SoD check passesPAY—
10payroll_managerLocks the runImmutable; payslips rendered; pay.run.lockedPAY—
11payroll_managerGenerates bank file per debit accountFile with row count and total; checksum shownPAY—
12payroll_managerUploads to the bank and confirms paymentRun Paid; claims marked Paid; F&F settlements updatedPAY, CLM, EXT—
13SystemPublishes payslips (on lock or scheduled)Payslips visible in web and mobilePAYPush and email with secure link
14payroll_managerGenerates ECR, ESIC, PT, LWF files and TDS dataFiles stored with adapter versionPAYDue-date reminders
15SystemOpens the next periodNew window; queued adjustments attach to the next runATT, PAY—

Exception paths​

SituationHandling
Late biometric data after lockPunches stored; day recompute creates att_adjustment; next run gets LOP_REVERSAL
Leave cancelled for a locked dateNeeds HR approval; adjustment flows to next run
Attendance must be reopenedatt.period.unlocked allowed only while the run is not locked; draft run invalidated and recalculated
Error found after the run is lockedReversal run plus corrected off-cycle run, or correction through next month's inputs (policy choice)
Employee missing bank detailsBlocking validation; hold the employee or pay by cheque or cash mode with audit
Negative net payNet floor applied; non-statutory recoveries deferred to next period with warning
Bank rejects some rowsMark rows failed; regenerate a file for failed rows after bank detail correction
Back-dated increment approved after lockArrears calculated against locked periods and added to the next run
Statutory rate changes mid-yearNew statutory pack version with effective date; runs pick the version valid for the period
Payroll window change freezePlatform defers non-urgent releases from the 25th to the 5th; hotfixes follow extra review