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
readonlyassignmentIds:string[]
Defined in: src/server/services/payroll.ts:85
Assignment ids actually paid — the scope the close locks/verifies (not the whole period).
errors
readonlyerrors:object[]
Defined in: src/server/services/payroll.ts:96
contractorId
contractorId:
string
contractorName
contractorName:
string
message
message:
string
lines
readonlylines:PayRunLine[]
Defined in: src/server/services/payroll.ts:82
manualDeductions
readonlymanualDeductions: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
readonlyperiod:object
Defined in: src/server/services/payroll.ts:74
end
readonlyend:string
half
readonlyhalf:PeriodHalf
month
readonlymonth:number
paymentDate
readonlypaymentDate:string
start
readonlystart:string
year
readonlyyear:number
pricedEntryCount
readonlypricedEntryCount: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
readonlypricedHours:number
Defined in: src/server/services/payroll.ts:89
Raw (unrounded) sum of payable hours that fed the priced amounts (TOCTOU check).
totalCentavos
readonlytotalCentavos:number
Defined in: src/server/services/payroll.ts:83
warnings
readonlywarnings:object
Defined in: src/server/services/payroll.ts:90
draftDays
readonlydraftDays:number
Un-submitted draft days that were excluded from pay.
pendingApprovalDays
readonlypendingApprovalDays:number
Days still awaiting facility overage approval (left unlocked; pay unaffected).