Skip to main content

Interface: PayRunPreview

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

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

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

contractorId​

contractorId: string

contractorName​

contractorName: string

message​

message: string


lines​

readonly lines: PayRunLine[]

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


manualDeductions​

readonly manualDeductions: object[]

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

Out-of-band (manual) payouts already recorded for THIS period, deducted from the lines above — shown in the preview so the owner sees why a contractor's figure shrank or disappeared. The TOCTOU snapshot (assignmentIds/pricedEntryCount/pricedHours) deliberately still covers the deducted assignments: their entries were priced and must be locked/verified at close even when the manual payout already settled the money.

amountCentavos​

amountCentavos: number

contractorId​

contractorId: string

contractorName​

contractorName: string

unappliedCentavos​

unappliedCentavos: number

Recorded out-of-band pay the run could NOT absorb (payout exceeds the computed lines, or the contractor has none) — a possible over-payment the owner must see, never silently clamped.


period​

readonly period: object

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

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

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

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


totalCentavos​

readonly totalCentavos: number

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


warnings​

readonly warnings: object

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

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).