Architecture Intergration
How the app fits into ERPNext/Frappe HR, what it adds to standard doctypes, and how access is split across roles.
Where the app sits in the system
NL Piece Rate Pay is not standalone. It is a thin, opinionated layer that complements existing ERPNext and Frappe HR doctypes:
| It relies on (from ERPNext / Frappe HR) | How it uses them |
|---|---|
| Activity Type | The work category |
| Item | The unit of work being priced |
| Attendance | Source of who was present, by date + shift |
| Shift Type | The filter that isolates casual workers |
| Employee Checkin | Source of check-in / check-out times for the record |
| Salary Structure | The structure assigned for the pay period |
| Salary Component | Used to route deductions (e.g. NSSF) |
| Salary Structure Assignment | The final output — how casual pay enters payroll |
| Employee | The worker being paid |
Because of this, the app declares ERPNext as a required app, and in practice Frappe HR must also be installed (Salary Structure, Salary Component, Attendance, Shift Type and Salary Structure Assignment all come from Frappe HR / Payroll).
Everything the app adds lives under its own module, NL Piece Rate Pay, and surfaces in the Desk through a dedicated "Casual Piece Rate" workspace, nested under the Payroll section, with quick shortcuts to the three doctypes an operator touches day to day.
What the app adds to standard doctypes
NL Piece Rate Pay is mostly self-contained, but it makes a few deliberate touches to core doctypes:
- Custom field on Salary Structure Assignment is a link field, Casual Weekly Pay, pointing back to the Casual Salary Structure Assignment Tool. This is shipped as a fixture, so it installs automatically with the app and gives full traceability from a payroll assignment to the casual run that produced it.
- Button on Activity Type: the Casual Item Cost shortcut.
- "Casual Piece Rate" workspace: a Desk workspace under Payroll with shortcuts to the Activity Item, the Salary Structure Assignment Tool, and the daily payout.
Roles and permissions
Permissions are split across three different roles, reflecting the three responsibilities:
| Document | Role with access |
|---|---|
| Casual Activity Item (pricing) | Projects User |
| Casual Payroll Payout (daily) | HR Manager |
| Casual Salary Structure Assignment Tool (period roll-up) | System Manager |
Worth knowing: the three doctypes that make up one continuous workflow sit behind three different roles. In a small team this is usually fine because senior staff hold several roles, but if you're setting up least-privilege access for a larger HR/payroll team, plan the role assignments deliberately — a user who can run the daily payout (HR Manager) cannot necessarily run the weekly roll-up (System Manager) without additional rights.