Skip to main content

Payslip

The Payslip entity, mapped to the payslip table.

Tablepayslip
Tenant-scopedYes — extends TenantOwned
Columns60
Relationships2
Sourcebackend/src/main/java/com/motorph/payroll/model/Payslip.java

Columns​

FieldTypeColumnNullNotes
payslipIdIntegerpayslip_id—primary key, generated
payslipNumberStringpayslip_number——
periodStartDateLocalDateperiod_start_date——
periodEndDateLocalDateperiod_end_date——
employeeNameStringemployee_name——
employeePositionStringemployee_position——
tinNumberStringtin_numberYes—
sssNumberStringsss_numberYes—
philhealthNumberStringphilhealth_numberYes—
pagibigNumberStringpagibig_numberYes—
basicSalaryBigDecimalmonthly_rate——
dailyRateBigDecimaldaily_rate——
daysWorkedIntegerdays_worked——
overtimeHoursBigDecimalovertime_hours——
overtimePayBigDecimalovertime_payYes—
nightDiffHoursBigDecimalnight_diff_hoursYes—
nightDiffPayBigDecimalnight_diff_payYes—
holidayPremiumPayBigDecimalholiday_premium_payYes—
restDayPremiumPayBigDecimalrest_day_premium_payYes—
unworkedHolidayPayBigDecimalunworked_holiday_payYes—
paidLeavePayBigDecimalpaid_leave_payYes—
yearEndTaxAdjustmentBigDecimalyear_end_tax_adjustmentYes—
grossIncomeBigDecimalgross_income——
riceSubsidyBigDecimalrice_subsidy——
phoneAllowanceBigDecimalphone_allowance——
clothingAllowanceBigDecimalclothing_allowance——
totalBenefitsBigDecimaltotal_benefits——
sssContributionBigDecimalsss_contribution——
sssEmployerShareBigDecimalsss_employer_shareYes—
sssMpfEmployeeShareBigDecimalsss_mpf_employee_shareYes—
sssMpfEmployerShareBigDecimalsss_mpf_employer_shareYes—
sssEcShareBigDecimalsss_ec_shareYes—
philhealthEmployerShareBigDecimalphilhealth_employer_shareYes—
pagibigEmployerShareBigDecimalpagibig_employer_shareYes—
philhealthContributionBigDecimalphilhealth_contribution——
pagibigContributionBigDecimalpagibig_contribution——
withholdingTaxBigDecimalwithholding_tax——
totalDeductionsBigDecimaltotal_deductions——
netPayBigDecimalnet_pay——
companyIdIntegercompany_idYes—
companyNameStringcompany_nameYes—
payrollRunDateLocalDatepayroll_run_dateYes—
paymentDateLocalDatepayment_dateYes—
paymentMethodStringpayment_methodYes—
paymentStatusStringpayment_status——
paymentReferenceStringpayment_referenceYes—
paidAtLocalDatepaid_atYes—
paymentFailureReasonStringpayment_failure_reasonYes—
employeeDepartmentStringemployee_departmentYes—
employeeManagerStringemployee_managerYes—
leaveDaysIntegerleave_daysYes—
absenceDaysIntegerabsence_daysYes—
taxableIncomeBigDecimaltaxable_incomeYes—
taxableBenefitsBigDecimaltaxable_benefitsYes—
bonusAmountBigDecimalbonus_amountYes—
otherDeductionsBigDecimalother_deductionsYes—
createdByStringcreated_byYes—
createdDateLocalDateTimecreated_dateYes—
lastModifiedByStringlast_modified_byYes—
lastModifiedDateLocalDateTimelast_modified_dateYes—

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​

FieldKindTargetJoin columnRequired
payroll@ManyToOnePayrollpayroll_idYes
employee@ManyToOneEmployeeemployee_idYes

Referenced by​

EntityFieldKind
PayrollPayoutBatchLinepayslip@ManyToOne
PayrollTransactionpayslip@ManyToOne
PayslipDeductionItempayslip@ManyToOne
PayslipHistorypayslip@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

MethodReturnsNotes
findAllByPayroll_PayrollIdOrderByEmployeeDepartmentAscEmployeeNameAsc(Integer payrollId)List<Payslip>derived
lockAllByPayroll(@Param("payrollId") Integer payrollId)List<Payslip>explicit @Query
findAllByPayrollRunDateBetweenAndPayroll_StatusNotInOrderByEmployeeDepartmentAscEmployeeNameAsc(LocalDate from, LocalDate to, Collection<String> excludedStatuses)List<Payslip>derived
findAllByPeriodEndDateBetweenAndPayroll_StatusNotInOrderByEmployeeNameAsc(LocalDate from, LocalDate to, Collection<String> excludedStatuses)List<Payslip>derived
findYtdThroughPeriod(@Param("employeeId") Integer employeeId, @Param("year") int year, @Param("periodEnd") LocalDate periodEnd, @Param("payrollId") Integer payrollId)PayslipYtdDtoexplicit @Query
findRunTotals(@Param("payrollIds") Collection<Integer> payrollIds)List<PayrollRunTotalsDto>explicit @Query
findWithDetailsByPayslipId(Integer payslipId)Optional<Payslip>derived
existsByPayroll_PayrollId(Integer payrollId)booleanderived
countByPayroll_PayrollId(Integer payrollId)longderived
findAllByPayroll_PayrollIdOrderByEmployee_EmployeeNumber(Integer payrollId)List<Payslip>derived
findAllByEmployee_EmployeeNumberAndPayrollRunDateBetweenAndPayroll_StatusNotInOrderByPayrollRunDateDesc(Integer employeeId, LocalDate start, LocalDate end, Collection<String> excludedStatuses)List<Payslip>derived
findDistinctYearsByEmployee(@Param("employeeId") Integer employeeId)List<Integer>explicit @Query
findYearToDateFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year)YearToDateFiguresDtoexplicit @Query
findYearToDateTaxFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year)YearToDateTaxFiguresDtoexplicit @Query
findMonthToDateContributionFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year, @Param("month") Integer month)MonthToDateContributionFiguresDtoexplicit @Query
findMonthToDateBenefitFigures(@Param("employeeId") Integer employeeId, @Param("year") Integer year, @Param("month") Integer month)MonthToDateBenefitFiguresDtoexplicit @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
findProcessed1601cFigures(@Param("from") LocalDate from, @Param("to") LocalDate to)List<Bir1601cEmployeeFiguresDto>explicit @Query
findProcessed2316Figures(@Param("from") LocalDate from, @Param("to") LocalDate to)List<Bir2316EmployeeFiguresDto>explicit @Query
findProcessedDailyRates(@Param("from") LocalDate from, @Param("to") LocalDate to)List<EmployeeAmountDto>explicit @Query

Reached by​

These controllers hold — directly or through a service they depend on — a repository over Payslip.

ControllerBase pathEndpointsModule
DemoDataController/api/system-admin/demo-data3Billing & Platform
GovernmentFormsController/api/government-forms16PH Statutory
PayoutBatchController/api/payroll7Payroll
PayrollController/api/payroll10Payroll
PayrollRunReportsController/api/payroll/{payrollId}5Payroll
PayrollTransactionController/api/payroll-transactions6Payroll
PayslipController/api/payslips7Payroll
PayslipHistoryController/api/payslip-history1Payroll
PublicPayrollSimulatorController/api/public/payroll-simulator3Payroll
RecognitionAwardController/api/recognition-awards7HR
ReportingController/api/reports16Platform 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/.