dodil/erp-brick-payroll

DODIL ERP brick: payroll

README.md

erp-brick-payroll

UK payroll as a DODIL ERP brick (Brick("payroll", namespace="prl")), built from erp-method modules/payroll/module.yaml v1 (signed 2026-10-25). Slice A: the monthly pay run for salaried employees - gross from hr's payroll extract (part periods prorated by working days), PAYE cumulative from dated tax code rows, Class 1 NI category A, pension on qualifying earnings by the net pay arrangement, net pay; approval by a second person (the approver's own payslip by a peer); payslips as PDF documents; ONE journal to gl and one payout per payslip to payments, both after the commit from pending rows.

Slice B (0.2.0): statutory sick and maternity pay from time-off's absence facts (waiting days, linked periods, the lower earnings limit test, SMP's 90% then flat rate, all dated rows), weekly pay on the weekly tax and NI tables, starters (statements A, B and C, the P45 they bring, the emergency code) and leavers (the P45 out, a payment after it on 0T), the FPS, the EPS and the pension contribution file as deterministic documents handed to a capability from pending rows (no provider by default: a manual task with the file and its deadline; nothing is ever submitted from here), and the previous provider's year to date loaded through a reader port, reconciled to the penny, signed by the owner and discarded if wrong.

Every use case is an API route and an MCP tool (application/use_cases.py); the signed process is served at GET /process/bpmn.

pip install -e ../erp-platform -e '.[test]'
pytest -q --tb=short

The 2026/27 statutory rows are seeded to_confirm: check them against HMRC's published rates before the first run. See AGENTS.md.