Running Payroll
8 min readThis guide covers the end-to-end process of running payroll in TalinoHR, from creating a payroll run through disbursement.
Payroll Run Lifecycle
Every payroll run follows this status progression:
DRAFT -> PROCESSING -> COMPUTED -> REVIEWED -> APPROVED -> DISBURSED -> CLOSED
| Status | Description |
|---|---|
| DRAFT | Run created with period dates; no computation yet |
| PROCESSING | Engine is actively computing (transient state) |
| COMPUTED | All employee items computed; ready for review |
| REVIEWED | HR/Payroll has reviewed items; enters approval workflow |
| APPROVED | All approval steps completed; ready for disbursement |
| DISBURSED | Salaries have been released to employees |
| CLOSED | Run finalized and locked; no further changes |
Creating a Payroll Run
Navigate to Payroll (/payroll) and click "New Payroll Run."
Required Information
- Period Start - First day of the pay period
- Period End - Last day of the pay period
- Run Type - Usually REGULAR for normal payroll. Other types (THIRTEENTH_MONTH, ANNUALIZATION, LEAVE_MONETIZATION, FINAL_PAY) are created from their respective pages
- Location (optional) - Scope the run to a specific branch. If blank, all active employees are included
Overlap Protection
The system prevents creating overlapping payroll runs. If a REGULAR run already exists for the same period (and location), you will be prompted to use the existing run instead.
Location-Scoped Runs
When a location is specified, only employees assigned to that location are included in the computation. This is useful for multi-branch companies that process payroll per office.
The 17-Step Payroll Engine
When you click "Compute," the engine runs through 17 steps for each employee:
Step 1: Fetch Employee Data
Loads the employee record with company settings, work schedule, active allowances, active deductions, and active loans.
Step 2: Compute Basic Pay
Derives the period's basic pay based on pay frequency:
- Semi-monthly: monthlySalary / 2
- Monthly: monthlySalary (full amount)
- Weekly: dailyRate x workDaysPerWeek
- Daily: dailyRate
The engine respects the employee's pay basis (MONTHLY, DAILY, HOURLY) and uses the work schedule to derive workDaysPerMonth and workHoursPerDay via getScheduleParams().
Step 3: Fetch Attendance Records
Retrieves all attendance records for the employee within the pay period.
Step 4: Compute Attendance Deductions
Calculates deductions for:
- Late minutes - Converted to hourly rate deduction
- Undertime minutes - Same as late
- Absent days - Full or half-day deduction at daily rate
- Unpaid leave - Days on unpaid leave types count as absent
Paid leave days are excluded from deduction calculations.
Step 5: Compute Overtime Pay
Reads approved OvertimeApplication records for the period. Each overtime entry is computed using DOLE multipliers based on the day type:
- Ordinary day: 125%
- Rest day: 130%
- Special non-working holiday: 130%
- Special non-working holiday + rest day: 150%
- Regular holiday: 200%
- Regular holiday + rest day: 260%
Step 6: Compute Holiday Pay
Processes all holidays in the pay period. For each holiday:
- Determines if the employee worked or not
- Checks if the day is also a rest day (double premium)
- Applies the day-before-holiday rule (Art. 94, Labor Code): if an employee was absent on the nearest preceding workday without leave, they forfeit regular holiday pay
Step 7: Compute Night Differential
10% premium for hours worked between 10:00 PM and 6:00 AM. Night differential stacks on the day-type multiplier (e.g., NSD on a regular holiday uses the holiday rate as base, not just the ordinary rate).
Step 8: Compute Allowances
Sums all active recurring allowances assigned to the employee.
Step 8.5: Consume Payroll Adjustments
Reads PENDING PayrollAdjustment records (created by personnel actions like merit increases or promotions). These are added to the otherEarnings component and marked as APPLIED after the payroll item is upserted.
Step 9: Compute Gross Pay
grossPay = basicPay - attendanceDeductions + overtimePay + holidayPay + nightDiffPay + allowances + otherEarnings
Step 10: Compute SSS Contribution
Looks up the SSS bracket based on derived monthly salary. Splits the contribution if semi-monthly.
Step 11: Compute PhilHealth Contribution
5% of monthly salary, split 50/50 employee/employer. Applies floor (P10,000) and ceiling (P100,000). Splits if semi-monthly.
Step 12: Compute Pag-IBIG Contribution
2% employee / 2% employer for salaries over P1,500. Ceiling of P10,000 monthly base. Splits if semi-monthly.
Step 13: Compute Withholding Tax
Uses TRAIN Law brackets to compute tax on taxable income (gross pay minus government contributions).
Step 14: Compute Loan Deductions
Deducts installments from active loans. Creates LoanPayment records, updates loan balances, and auto-closes loans when fully paid.
Step 15: Compute Other Deductions
Sums all active recurring deductions assigned to the employee.
Step 16: Compute Total Deductions
totalDeductions = SSS + PhilHealth + PagIBIG + withholdingTax + loanDeductions + otherDeductions
Step 17: Compute Net Pay
netPay = grossPay - totalDeductions
Reviewing Payroll Items
After computation, navigate to the payroll run detail page (/payroll/[id]) to review individual employee items.
What to Check
- Verify basic pay amounts match employee records
- Check attendance deductions against DTR records
- Confirm overtime amounts match approved OT applications
- Review holiday pay entries (especially day-before-holiday rule deductions)
- Validate government contribution amounts
- Check loan deduction amounts against active loans
Computation Details
Each payroll item stores detailed computation breakdowns in the computationDetails field, including overtime breakdown (per date, hours, day type, multiplier, amount), holiday breakdown, night differential breakdown, and loan payment details.
Manual Adjustments
You can add manual adjustments to a payroll run while it is in DRAFT or COMPUTED status.
Navigate to the payroll run detail page and use the adjustment dialog to add:
- Earnings - Additional compensation not captured by the engine
- Deductions - Additional deductions
Adjustments are tracked with a full audit trail. The adjustment history shows who made each change and when.
After adding adjustments, recompute the payroll to incorporate the changes into the final calculations.
Recomputation
If you need to recalculate after making changes:
- Navigate to the payroll run detail page
- Click "Recompute"
The recomputation process:
- Reverses all loan payments from the previous computation
- Resets APPLIED payroll adjustments back to PENDING
- Re-runs the full 17-step engine for all employees
- Re-applies adjustments and re-creates loan payments
Recomputation is only available for runs in COMPUTED status.
Approval Workflow
When the payroll is reviewed and ready, advance the status to REVIEWED. This triggers the approval workflow.
How Approval Works
The approval chain is configured in ComplianceSetting with the key payroll-approval-chain. The default chain is:
- PAYROLL_ADMIN reviews and approves
- HR_ADMIN gives final approval
Each step creates a PayrollApprovalStep record. Approvers can approve or reject at each step.
SUPER_ADMIN users bypass the chain and can approve at any stage.
Rejection
If any approver rejects, the run returns to COMPUTED status for corrections. The rejection reason is recorded in the audit log.
Bank File Export
Once a payroll run is APPROVED or DISBURSED, you can export a bank file for salary crediting.
Navigate to the payroll run detail page and click "Export Bank File." This generates a CSV with:
- Employee number
- Employee name
- Bank name
- Bank account number
- Bank account name
- Net pay amount
The CSV is formatted for upload to your company's banking portal.
Payslip Delivery
After the payroll run is approved, you can send payslips to employees via email.
Email Delivery
The system generates HTML payslips and sends them via Mailjet. Each payslip includes:
- Employee and company details
- Pay period information
- Earnings breakdown (basic pay, overtime, holiday pay, night differential, allowances)
- Deductions breakdown (SSS, PhilHealth, Pag-IBIG, withholding tax, loans)
- Net pay
- Year-to-date totals
- Bank details
Password Protection
Payslips can be password-protected using the configured password scheme (stored in ComplianceSetting payslip-password-scheme). The default scheme combines the employee's last name with their birth date.
Payroll Register
Navigate to the payroll run detail page and click "Download Register" to export a comprehensive payroll register.
The register is a CSV with all payroll items in the run, including all earnings, deductions, government contributions, and net pay for each employee, plus totals.
Audit Trail
Every payroll action is automatically logged in the PayrollAuditLog:
- Run creation and deletion
- Status changes
- Recomputation events
- Item adjustments
- Approval step actions (approved/rejected)
- Payslip delivery
Navigate to the payroll run detail page to view the full audit history with timestamps and user details.
Common Issues
Employee Missing from Payroll Run
- Check that the employee is active (not RESIGNED/TERMINATED/RETIRED)
- If the run is location-scoped, verify the employee is assigned to that location
- Ensure the employee's hire date is before the period end
Incorrect Daily Rate
- Verify the employee's pay basis (MONTHLY/DAILY/HOURLY)
- Check the assigned work schedule's work hours and days
- For HOURLY employees, the daily rate is hourlyRate x workHoursPerDay (always rounded to 2 decimal places)
Government Contributions Not Computing
- Ensure the SSS, PhilHealth, and Pag-IBIG contribution tables are loaded in the database
- Verify the employee has a valid monthly salary equivalent above the minimum threshold