Skip to content
QTO ERP Docs
Try QTO ERP for FREE
EN QTO ERP

Salary Calculation

Payroll calculation creates or updates Salary Records for a completed period.

flowchart TD
A[Active Salary Profile] --> B[Attendance Summary]
B --> C[Overtime and Under-Hour Adjustment]
C --> D[Allowances]
D --> E[Gross Salary]
E --> F[Income Tax]
F --> G[Benefit Deductions]
G --> H[Net Pay]
H --> I[Salary Record]
Input Source
Base salary Active salary profile.
Expected working hours Attendance calculation for the selected period.
Total working hours Attendance records for the selected period.
Overtime details Attendance overtime policies and multipliers.
Buffer hours Attendance buffer policy usage.
Allowances Active salary profile allowances that overlap the period.
Benefit deductions Active salary profile benefit deductions that overlap the period.
Tax slabs Active income tax year and configured slabs.
Leave bonus Cashable leave balances and leave policies.
Value Verified behavior
Hourly rate Base salary divided by expected working hours.
Under hours Expected working hours minus total working hours, not less than zero.
Overtime compensation Buffer hours cover under-hours first. Then raw overtime covers remaining under-hours, using highest multipliers first. Only leftover overtime is paid.
Overtime pay Paid adjusted overtime hours multiplied by hourly rate.
Under-hour deduction Remaining uncompensated under-hours multiplied by the full-precision hourly rate, capped so gross salary cannot become negative.
Gross salary Base salary + overtime pay + allowances - under-hour deductions.
Income tax Calculated from taxable salary divisions using the active tax year and year-to-date counters.
Benefit deductions Calculated after tax, using net pay after tax as the base for percentage deductions.
Net pay Net pay after tax - benefit deductions, capped at zero.

If an employee has 7 under-hours, 4 buffer hours, and 4.5 raw overtime hours split across higher multipliers:

  1. Buffer covers 4 under-hours.
  2. 3 under-hours remain.
  3. Overtime raw hours cover the remaining under-hours.
  4. Only overtime left after this compensation is paid.
  • Payroll cannot be generated for a future period.
  • A valid active income tax year must exist.
  • The salary profile must be active and valid for the selected period.
  • Invalid salary profile configuration is returned as a per-profile failure.
  • Payroll records are unique by employee and period.