Skip to main content

Interface: PayRunPreview

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

Read-only result of computing (not persisting) a pay run for a period.

Remarks

totalCentavos is the sum of every line's amountCentavos, in PHP integer centavos. The assignmentIds / pricedEntryCount / pricedHours triple is the close-time TOCTOU snapshot: it counts only in-period payable entries (each calendar day is locked by exactly one period), not the wider settling-week span the outsourced engine actually prices over. errors holds per-contractor pay-engine failures (the Result error branch of calculateContractorPay); those contractors are omitted from lines but the run still succeeds.

Properties

assignmentIds

readonly assignmentIds: string[]

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

Assignment ids actually paid — the scope the close locks/verifies (not the whole period).


errors

readonly errors: object[]

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

contractorId

contractorId: string

contractorName

contractorName: string

message

message: string


lines

readonly lines: PayRunLine[]

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


period

readonly period: object

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

end

readonly end: string

half

readonly half: PeriodHalf

month

readonly month: number

paymentDate

readonly paymentDate: string

start

readonly start: string

year

readonly year: number


pricedEntryCount

readonly pricedEntryCount: number

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

Count of payable entries that fed the priced amounts (for the close-time TOCTOU check).


pricedHours

readonly pricedHours: number

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

Raw (unrounded) sum of payable hours that fed the priced amounts (TOCTOU check).


totalCentavos

readonly totalCentavos: number

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


warnings

readonly warnings: object

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

draftDays

readonly draftDays: number

Un-submitted draft days that were excluded from pay.

pendingApprovalDays

readonly pendingApprovalDays: number

Days still awaiting facility overage approval (left unlocked; pay unaffected).