PayslipDeductionItem
Itemized custom-deduction line generated for a payslip.
| Table | payslip_deduction_items |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 4 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/PayslipDeductionItem.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
payslipDeductionItemId | Integer | payslip_deduction_item_id | — | primary key, generated |
label | String | label | — | — |
amount | BigDecimal | amount | — | — |
createdDate | LocalDateTime | created_date | — | — |
Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
payslip | @ManyToOne | Payslip | payslip_id | Yes |
employeeDeduction | @ManyToOne | EmployeeDeduction | employee_deduction_id | — |
Neighbourhood
Repository
PayslipDeductionItemRepository
Declared over PayslipDeductionItem with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/PayslipDeductionItemRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByPayslip_PayslipIdOrderByPayslipDeductionItemIdAsc(Integer payslipId) | List<PayslipDeductionItem> | derived |
findAllByPayslip_PayslipIdInOrderByPayslipDeductionItemIdAsc(Collection<Integer> payslipIds) | List<PayslipDeductionItem> | derived |
findMonthToDateAppliedAmount(@Param("employeeDeductionId") Integer employeeDeductionId, @Param("year") int year, @Param("month") int month) | BigDecimal | explicit @Query |
Reached by
These controllers hold — directly or through a service they depend on — a repository over PayslipDeductionItem.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DemoDataController | /api/system-admin/demo-data | 3 | Billing & Platform |
| PayrollController | /api/payroll | 8 | Payroll |
| PayslipController | /api/payslips | 6 | Payroll |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.