Skip to main content

Interface: PayRunLine

Defined in: src/server/services/payroll.ts:101

One contractor-assignment's computed pay for a period. A contractor with more than one assignment (different facilities) produces one line per assignment; the lines are combined into a single payout per contractor at persist time (see combineLinesIntoPayments).

Remarks

All money fields are PHP integer centavos (1 PHP = 100 centavos), never floats. Hour fields are the settling-week totals the contractor was paid for (see computePayRun), rounded to 2 dp.

Properties

amountCentavos

readonly amountCentavos: number

Defined in: src/server/services/payroll.ts:111

Computed payout for this assignment in centavos; always > 0 (zero-pay lines are dropped).


assignmentId

readonly assignmentId: string

Defined in: src/server/services/payroll.ts:105

The contractor↔facility assignment version this line was priced from.


bimonthlyRateCentavos

readonly bimonthlyRateCentavos: number

Defined in: src/server/services/payroll.ts:110

Full bi-monthly contract rate in centavos (the cap for a fully worked, non-overage period).


breakdown

readonly breakdown: SerializedWeek[]

Defined in: src/server/services/payroll.ts:114

Per-week serialized pay breakdown (hours, contracted, ratio, pay) for the payslip detail view.


contractedHours

readonly contractedHours: number

Defined in: src/server/services/payroll.ts:108

Pro-rated contracted hours over the same settling weeks (adjusted for assignment effective/end dates), rounded to 2 dp.


contractorId

readonly contractorId: string

Defined in: src/server/services/payroll.ts:102

Contractor UUID; payments are keyed by this id, not by name.


contractorName

readonly contractorName: string

Defined in: src/server/services/payroll.ts:103

Display name (First Last) for preview/draft tables only; the Wise file and payslips use the full legal name separately.


contractorType

readonly contractorType: ContractorType

Defined in: src/server/services/payroll.ts:104

'outsourced' or 'in_house_admin'; only in-house admins accrue holiday credit, and only on their primary assignment.


facilityName

readonly facilityName: string | null

Defined in: src/server/services/payroll.ts:106

Facility display name, or null if the facility row was not found.


hoursWorked

readonly hoursWorked: number

Defined in: src/server/services/payroll.ts:107

Payable hours that fed this line, summed over the settling weeks, rounded to 2 dp.


idempotencyKey

readonly idempotencyKey: string

Defined in: src/server/services/payroll.ts:113

Per-contractor key payrun:{companyId}:{start}:{end}:{contractorId} — identical across a contractor's assignment lines so they merge into one payment.


paymentDate

readonly paymentDate: string

Defined in: src/server/services/payroll.ts:112

ISO date (YYYY-MM-DD) the payout is scheduled, derived from the period.


ratio

readonly ratio: number

Defined in: src/server/services/payroll.ts:109

Paid fraction = amountCentavos / bimonthlyRateCentavos (0 when rate is 0).