Skip to main content

Interface: PayRunLine

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

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:56

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:50

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


bimonthlyRateCentavos​

readonly bimonthlyRateCentavos: number

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

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:59

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:53

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:47

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


contractorName​

readonly contractorName: string

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

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:49

'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:51

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


hoursWorked​

readonly hoursWorked: number

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

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:58

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:57

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


ratio​

readonly ratio: number

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

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