Payslip
The Payslip entity, mapped to the payslip table.
| Table | payslip |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 52 |
| Relationships | 2 |
| Source | backend/src/main/java/com/motorph/payroll/model/Payslip.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
payslipId | Integer | payslip_id | — | primary key, generated |
payslipNumber | String | payslip_number | — | — |
periodStartDate | LocalDate | period_start_date | — | — |
periodEndDate | LocalDate | period_end_date | — | — |
employeeName | String | employee_name | — | — |
employeePosition | String | employee_position | — | — |
tinNumber | String | tin_number | Yes | — |
sssNumber | String | sss_number | Yes | — |
philhealthNumber | String | philhealth_number | Yes | — |
pagibigNumber | String | pagibig_number | Yes | — |
monthlyRate | BigDecimal | monthly_rate | — | — |
dailyRate | BigDecimal | daily_rate | — | — |
daysWorked | Integer | days_worked | — | — |
overtimeHours | BigDecimal | overtime_hours | — | — |
overtimePay | BigDecimal | overtime_pay | Yes | — |
nightDiffHours | BigDecimal | night_diff_hours | Yes | — |
nightDiffPay | BigDecimal | night_diff_pay | Yes | — |
holidayPremiumPay | BigDecimal | holiday_premium_pay | Yes | — |
restDayPremiumPay | BigDecimal | rest_day_premium_pay | Yes | — |
unworkedHolidayPay | BigDecimal | unworked_holiday_pay | Yes | — |
yearEndTaxAdjustment | BigDecimal | year_end_tax_adjustment | Yes | — |
grossIncome | BigDecimal | gross_income | — | — |
riceSubsidy | BigDecimal | rice_subsidy | — | — |
phoneAllowance | BigDecimal | phone_allowance | — | — |
clothingAllowance | BigDecimal | clothing_allowance | — | — |
totalBenefits | BigDecimal | total_benefits | — | — |
sssContribution | BigDecimal | sss_contribution | — | — |
sssEmployerShare | BigDecimal | sss_employer_share | Yes | — |
philhealthEmployerShare | BigDecimal | philhealth_employer_share | Yes | — |
pagibigEmployerShare | BigDecimal | pagibig_employer_share | Yes | — |
philhealthContribution | BigDecimal | philhealth_contribution | — | — |
pagibigContribution | BigDecimal | pagibig_contribution | — | — |
withholdingTax | BigDecimal | withholding_tax | — | — |
totalDeductions | BigDecimal | total_deductions | — | — |
netPay | BigDecimal | net_pay | — | — |
companyId | Integer | company_id | Yes | — |
companyName | String | company_name | Yes | — |
payrollRunDate | LocalDate | payroll_run_date | Yes | — |
paymentDate | LocalDate | payment_date | Yes | — |
paymentMethod | String | payment_method | Yes | — |
employeeDepartment | String | employee_department | Yes | — |
employeeManager | String | employee_manager | Yes | — |
leaveDays | Integer | leave_days | Yes | — |
absenceDays | Integer | absence_days | Yes | — |
taxableIncome | BigDecimal | taxable_income | Yes | — |
taxableBenefits | BigDecimal | taxable_benefits | Yes | — |
bonusAmount | BigDecimal | bonus_amount | Yes | — |
otherDeductions | BigDecimal | other_deductions | Yes | — |
createdBy | String | created_by | Yes | — |
createdDate | LocalDateTime | created_date | Yes | — |
lastModifiedBy | String | last_modified_by | Yes | — |
lastModifiedDate | LocalDateTime | last_modified_date | Yes | — |
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 |
|---|---|---|---|---|
payroll | @ManyToOne | Payroll | payroll_id | Yes |
employee | @ManyToOne | Employee | employee_id | Yes |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| PayrollTransaction | payslip | @ManyToOne |
| PayslipDeductionItem | payslip | @ManyToOne |
| PayslipHistory | payslip | @ManyToOne |
Neighbourhood
Repository
PayslipRepository
Declared over Payslip with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PayslipRepository.java
| Method | Returns | Notes |
|---|---|---|
findWithDetailsByPayslipId(Integer payslipId) | Optional<Payslip> | derived |
existsByPayroll_PayrollId(Integer payrollId) | boolean | derived |
countByPayroll_PayrollId(Integer payrollId) | long | derived |
findAllByPayroll_PayrollIdOrderByEmployee_EmployeeNumber(Integer payrollId) | List<Payslip> | derived |
findAllByEmployee_EmployeeNumberAndPayrollRunDateBetweenOrderByPayrollRunDateDesc(Integer employeeId, LocalDate start, LocalDate end) | List<Payslip> | derived |
findDistinctYearsByEmployee(@Param("employeeId") Integer employeeId) | List<Integer> | explicit @Query |
findYearToDateFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year) | YearToDateFiguresDto | explicit @Query |
findYearToDateTaxFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year) | YearToDateTaxFiguresDto | explicit @Query |
findMonthToDateContributionFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year, @Param("month") Integer month) | MonthToDateContributionFiguresDto | explicit @Query |
findMonthToDateBenefitFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year, @Param("month") Integer month) | MonthToDateBenefitFiguresDto | explicit @Query |
findYearToDateFiguresForAllEmployees(@Param("year") Integer year) | List<EmployeeYearToDateFiguresDto> | explicit @Query |
findMonthlyFiguresForAllEmployees(@Param("year") Integer year, @Param("month") Integer month) | List<EmployeeMonthlyFiguresDto> | explicit @Query |
findThirteenthMonthBaseForAllEmployees(@Param("year") Integer year) | List<EmployeeThirteenthMonthBaseDto> | explicit @Query |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Payslip.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| DemoDataController | /api/system-admin/demo-data | 3 | Billing & Platform |
| GovernmentFormsController | /api/government-forms | 8 | PH Statutory |
| PayrollController | /api/payroll | 8 | Payroll |
| PayrollTransactionController | /api/payroll-transactions | 6 | Payroll |
| PayslipController | /api/payslips | 6 | Payroll |
| PayslipHistoryController | /api/payslip-history | 1 | Payroll |
| RecognitionAwardController | /api/recognition-awards | 7 | HR |
| ReportingController | /api/reports | 16 | Platform Misc |
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/.