<aside> 🔁 Synced from GitHub #632c4d3fadcd. Edit in the paidhr-system-docs repository, not here: changes made in Notion are overwritten.
</aside>
Status: Live
💡 In plain words
Leave, loans, salary advances, document letters, exits, moves and suspensions all work the same way under the hood.
An employee (or HR on their behalf) asks for something. The company's rules for that type of request are checked. Then it goes to the right people to approve, one after another. When the last person approves, PaidHR does whatever that request needs, such as sending an email, adding a payroll deduction or producing a letter.
It's one front desk with one form tray for every kind of request. Only what happens after the final stamp differs.
Who's involved: the employee (asks), approvers (say yes, no, or send it back), and HR (sets the rules for each type).
Leave, loans, salary advances, document requests, exits, redeployments and suspensions are not separate systems. Each is a row in one table, EmployeeRequests, with a type, a policy that sets its rules, and a status. They all move through the same review method and the same approval chains. Only the side effects of the final approval differ by type. Learn this page and you understand seven features.
| Id | Type | Policy table | Detail page |
|---|---|---|---|
| 1 | Leave | LeavePolicies / LeavePolicyItems |
Leave |
| 2 | Loan | LoanPolicies / LoanPolicyItems |
Loans & salary advance |
| 3 | Salary advance | AdvancePolicies / AdvancePolicyItems |
Loans & salary advance |
| 4 | Document | DocumentPolicies / DocumentPolicyItems |
Below |
| 5 | Exit | ExitPolicies / ExitPolicyItems |
Exit |
| 6 | Redeployment | RedeploymentPolicies / RedeploymentPolicyItems |
Below |
| 7 | Suspension | — | Below |
Policy items hold the per-level rules: one row per pay band, pay grade or policy group (entitlement days, maximum loan amount, notice period…). When a person raises a request, the system finds the item that matches their band, grade or group.
| Id | Status | Meaning |
|---|---|---|
| 3 | New | Submitted, waiting for review |
| 1 | Approved | Every step approved |
| 2 | Declined | An approver said no |
| 5 | Returned | Sent back to the employee for correction |
| 6 | Withdrawn | The employee pulled it back before a decision |
| 4 | Cancelled | Cancelled after approval (for example leave that was not taken) |
stateDiagram-v2
[*] --> New: employee or HR submits
New --> New: a step approves, more steps remain
New --> Approved: last step approves
New --> Declined: any step declines
New --> Returned: returned for correction
Returned --> New: employee resubmits
New --> Withdrawn: employee withdraws
Approved --> Cancelled: cancelled / leave cut short
Approved --> [*]
RequestService.ReviewEmployeeRequest:
spReviewEmployeeRequest (note, for payroll and deduct from payroll flags, survey id for exits). The procedure writes an EmployeeRequestReviews row and moves the step on.