---
tags: [hr, controller]
module: HR
---

# PayrollEntriesController

## Connections
[[_HR]] · [[[Model]PayrollEntry]] · [[[Service]PayrollServices]] · [[[Routes]Routes]] · [[Accounting/[Middleware]Middleware]] · [[[Model]JournalEntry]]

## Source
```
Modules/HR/Http/Controllers/PayrollEntriesController.php
Modules/HR/Http/Controllers/Exporting/Printing/PayrollEntriesController.php
```

## Web Methods

| Method | Route | Middleware |
|---|---|---|
| index | GET /hr/payroll | hr.payroll.view |
| create | GET /hr/payroll/create | hr.payroll.create |
| store | POST /hr/payroll | check-manual-entry-locking |
| show | GET /hr/payroll/{id} | hr.payroll.view |
| edit | GET /hr/payroll/{id}/edit | hr.payroll.edit |
| update | PUT /hr/payroll/{id} | check-manual-entry-locking |
| destroy | DELETE /hr/payroll/{id} | check-manual-entry-locking |
| print | GET /hr/payroll/{id}/print | hr.payroll.export |

## Notes
- `check-manual-entry-locking` + `unlock-manual-entry-operation` are Accounting middleware — see [[Accounting/[Middleware]Middleware]]
- Dispatches `FillOpeningClosingBalance` job (Accounting) after store/update/destroy
- Each store/update triggers [[[Service]PayrollServices]] → [[[Service]JournalEntryServices]] → creates [[[Model]JournalEntry]]
