Skip to main content

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​

readonly actualHours: number

Defined in: src/lib/invoice/index.ts:31

Hours actually worked in the week. Billed quantity = min(actual, contracted) unless approved.

Inherited from​

InvoiceLineInput.actualHours


amountCents​

readonly amountCents: Cents

Defined in: src/lib/invoice/index.ts:48


assignmentId​

readonly assignmentId: string

Defined in: src/lib/invoice/index.ts:24

Inherited from​

InvoiceLineInput.assignmentId


billedHours​

readonly billedHours: 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​

readonly contractedHours: 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​

readonly contractorId: string

Defined in: src/lib/invoice/index.ts:23

Inherited from​

InvoiceLineInput.contractorId


contractorName​

readonly contractorName: string

Defined in: src/lib/invoice/index.ts:25

Inherited from​

InvoiceLineInput.contractorName


description​

readonly description: string

Defined in: src/lib/invoice/index.ts:45


hourlyRateCents​

readonly hourlyRateCents: 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?​

readonly optional overageApproved?: 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​

readonly serviceType: string | null

Defined in: src/lib/invoice/index.ts:27

e.g. "MDS Assessor" — printed as " Services () - ".

Inherited from​

InvoiceLineInput.serviceType


varianceFlagged​

readonly varianceFlagged: 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​

readonly variancePct: 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.