<aside> 🔁 Synced from GitHub #0c40bc2abfde. Edit in the paidhr-system-docs repository, not here: changes made in Notion are overwritten.
</aside>
Status: Live
💡 In plain words
Time & attendance tracks when people should work, when they actually did, and pays accordingly.
The company sets up its sites and shifts. Employees clock in and out on the phone app or a wall terminal, and PaidHR checks they're on time and at the right place. Each day's work becomes a timesheet, which managers review. Approved hours feed overtime and hourly pay. A missed shift is sent to the employer to check before anything changes; only once they agree does it reduce pay.
A digital clocking-in card, checked against the rota, that the payroll clerk reads at the end of the month.
Who's involved: employees (clock in), managers (approve timesheets), HR (sets shifts and rules), and payroll.
Time & attendance (T&A) decides when people should work, records when they actually did, and turns the difference into pay. A company sets up workplaces and shift plans, assigns employees to shifts, and employees clock in and out from the mobile app (or a wall terminal), each clock-in checked against their shift and the workplace geofence. Each worked shift becomes a timesheet, flagged if it was late, early or off-site, and reviewed by approvers. Approved hours feed overtime, shift pay for hourly staff and, when someone doesn't turn up, absences that can reduce regular payroll. It all lives in ewa-service's time-tracking module, on tables in the tenant database.
| Term | Meaning |
|---|---|
| Workplace | An office address with T&A settings (WorkplaceConfig): working days, public holidays, approval behaviour |
| Duty location | A specific site inside a workplace, with coordinates for the geofence |
| Shift plan | The rules for a group of staff. Type rostered (fixed shifts on given days) or flexible (any-day shifts within weekly limits). Status draft or published |
| Shift period | A named shift inside a plan, with start and end times ("Morning 08:00–16:00") |
| Shift assignment | One employee on one shift period, either for a day of the week or a specific date. Shift tables let HR roster many at once |
| Any-day shift | In flexible plans: the employee may work any eligible shift, up to a weekly limit (AnyDayWeeklyLimits) |
| Shift differential | A percentage uplift for a shift period (night shift +20%) |
| Timesheet | One worked shift: clock-in, clock-out, coordinates, hours logged, hourly rate, amount, flags, approval state, and method (app, manual, upload, hardware device) |
| Absent record | A shift with no clock-in, created by the daily job. Carries a payroll stage: pending, approved, declined, withdrawn, removed or not sent |
| Overtime request | Hours beyond the shift, with its own approval chain |
| Shift swap | Two employees trade assignments. The colleague agrees first, then approvers |
| Timesheet payroll run | A pay run of approved timesheets for hourly staff, separate from regular payroll |
| Setting | Effect |
|---|---|
allowedClockInMinutesBeforeShift |
How early someone may clock in |
allowLateClockIn, allowedLateClockinInMinutes |
Whether lateness is allowed, and the grace period |
allowGeoFencing, geofencingOffsetMeters |
Require clock-in within this distance of the duty location |
allowManualTimeEntry, requireApprovalForManualTimeEntry |
Typed-in timesheets, and whether they need approval |
allowOvertime, bypassOvertimeApprovals, addOvertimeToPayroll, useOvertimeRecord |
How overtime is recorded and paid |
overtimeGraceMinutes |
How long past shift end a clock-out may run before it counts as overtime (0–240, default 15) |
allowSwapping, requireApprovalForSwap |
Shift swaps |
useInPayrollCalculation |
Whether these timesheets drive pay |
linkHardwareDevice, hardwareDeviceTypes |
Accept scans from clock-in terminals |
notificationCadence, notifiyMeBefore, smsNotification |
Shift reminders |
flowchart TB
A[Employee taps Clock in<br/>with location] --> B{Already clocked in?}
B -- yes --> X1[Refuse: You are already clocked in]
B -- no --> C{Plan exists and<br/>not archived?}
C -- no --> X2[Refuse: Shift plan unavailable]
C -- yes --> D{Assignment for today?}
D -- no --> X3[Refuse]
D -- yes --> E{Within allowed window?<br/>early limit / late grace}
E -- no --> X4[Refuse]
E -- yes --> G[Geofence status from coordinates<br/>vs duty location + offset]
G --> T[Create timesheet:<br/>clockIn, lat/long, lateClockin / earlyClockin flags]
Clock-out (timesheets/:id/clock-out) closes the timesheet, computes hours, and flags early or late clock-out and overtime. The employee is asked for a flag reason when a timesheet is flagged.
Only the mobile app (and terminals) clock in live. The web app handles setup, manual entries, uploads and approvals.
Timesheets go through the Time Tracking and Leave approval chain (approval-workflow.service.ts): timesheets/approve, timesheets/reject, with reasons. Bulk uploads and CSV exports are supported.
Status: Built The daily absent-record job is currently switched off. Its scheduler (runAbsentRecordCron, once 10:00 daily) is disabled, so in production no new absent records are created automatically and no absences are raised with payroll on their own. The job's logic still exists and can be run for chosen dates through a dev/staging-only endpoint (POST time-attendance/absent-records/run, refused with Forbidden Not available in production). Everything below describes what the job does when it runs; the viewing side (the Reporting tab's Absences list and each record's payroll stage) still works for records that already exist.