Skip to main content

Payslip

The Payslip entity, mapped to the payslip table.

Tablepayslip
Tenant-scopedYes — extends TenantOwned
Columns52
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—
monthlyRateBigDecimalmonthly_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—
yearEndTaxAdjustmentBigDecimalyear_end_tax_adjustmentYes—
grossIncomeBigDecimalgross_income——
riceSubsidyBigDecimalrice_subsidy——
phoneAllowanceBigDecimalphone_allowance——
clothingAllowanceBigDecimalclothing_allowance——
totalBenefitsBigDecimaltotal_benefits——
sssContributionBigDecimalsss_contribution——
sssEmployerShareBigDecimalsss_employer_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—
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
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
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_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)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

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-forms8PH Statutory
PayrollController/api/payroll8Payroll
PayrollTransactionController/api/payroll-transactions6Payroll
PayslipController/api/payslips6Payroll
PayslipHistoryController/api/payslip-history1Payroll
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/.