Interface: InvoiceLine
Defined in: src/lib/invoice/index.ts:44
A fully computed invoice line: the InvoiceLineInput plus the values derived by
computeInvoiceLines — printable description, billedHours (the lesser of actual and
contracted, or full actual when the overage is approved), amountCents (billed × rate, integer
USD cents), and the actual-vs-contracted variancePct / varianceFlagged advisory.
Extends
Properties
actualHours
readonlyactualHours:number
Defined in: src/lib/invoice/index.ts:31
Hours actually worked in the week. Billed quantity = min(actual, contracted) unless approved.
Inherited from
amountCents
readonlyamountCents:Cents
Defined in: src/lib/invoice/index.ts:48
assignmentId
readonlyassignmentId:string
Defined in: src/lib/invoice/index.ts:24
Inherited from
billedHours
readonlybilledHours:number
Defined in: src/lib/invoice/index.ts:47
The quantity actually billed = min(actual, contracted), or the full actual hours when the overage was approved.
contractedHours
readonlycontractedHours:number
Defined in: src/lib/invoice/index.ts:29
Contractor's weekly contracted hours — the billing cap (unless overage is approved).
Inherited from
InvoiceLineInput.contractedHours
contractorId
readonlycontractorId:string
Defined in: src/lib/invoice/index.ts:23
Inherited from
contractorName
readonlycontractorName:string
Defined in: src/lib/invoice/index.ts:25
Inherited from
InvoiceLineInput.contractorName
description
readonlydescription:string
Defined in: src/lib/invoice/index.ts:45
hourlyRateCents
readonlyhourlyRateCents:number
Defined in: src/lib/invoice/index.ts:33
Facility's contracted USD hourly rate, in integer cents (e.g. $80.00/hr → 8000).
Inherited from
InvoiceLineInput.hourlyRateCents
overageApproved?
readonlyoptionaloverageApproved?:boolean
Defined in: src/lib/invoice/index.ts:35
Facility approved this week's overage → bill the full actual hours (lift the contracted cap).
Inherited from
InvoiceLineInput.overageApproved
serviceType
readonlyserviceType:string|null
Defined in: src/lib/invoice/index.ts:27
e.g. "MDS Assessor" — printed as "
Inherited from
varianceFlagged
readonlyvarianceFlagged:boolean
Defined in: src/lib/invoice/index.ts:59
True when this line needs owner review before sending: variancePct exceeds the facility's
threshold AND the overage was not approved. An approved overage is considered resolved and is
never flagged. Advisory only — does not block the send.
variancePct
readonlyvariancePct:number
Defined in: src/lib/invoice/index.ts:53
|actual − contracted| ÷ contracted, as a percentage, rounded to one decimal place. With no contracted hours: 100 if any hours were worked, otherwise 0.