Skip to main content

Interface: InvoiceShelfData

Defined in: src/server/services/invoice/weeklyRun.ts:158

The full billing-detail payload for one facility's week, rendered in the invoice shelf.

periodStartIso/periodEndIso are the Sun–Sat billing week as ISO date strings. thresholdPct is the facility's variance-flag threshold (defaults to 10 when unset). lines is the per-contractor reconciliation (see ReconLine), sorted by contractor name; totalCents is the sum of line amounts in integer cents (a live preview of what the generated invoice will bill). The hasUnapproved, hasMissingRate, and hasBillingContact flags drive the shelf's send-readiness warnings. invoice is the most recent non-void invoice already stored for this facility+period (null when none exists); its totalCents is integer cents and may differ from the live totalCents if data changed after the draft was generated.

Properties​

facilityId​

facilityId: string

Defined in: src/server/services/invoice/weeklyRun.ts:159


facilityName​

facilityName: string

Defined in: src/server/services/invoice/weeklyRun.ts:160


hasBillingContact​

hasBillingContact: boolean

Defined in: src/server/services/invoice/weeklyRun.ts:168


hasMissingRate​

hasMissingRate: boolean

Defined in: src/server/services/invoice/weeklyRun.ts:167


hasUnapproved​

hasUnapproved: boolean

Defined in: src/server/services/invoice/weeklyRun.ts:166


invoice​

invoice: { drifted: boolean; dueDate: string | null; id: string; number: string; pdfPath: string | null; sentAt: string | null; status: string; totalCents: number; } | null

Defined in: src/server/services/invoice/weeklyRun.ts:169

Union Members​

Type Literal​

{ drifted: boolean; dueDate: string | null; id: string; number: string; pdfPath: string | null; sentAt: string | null; status: string; totalCents: number; }

drifted​

drifted: boolean

Only meaningful for an issued (sent/partial/overdue) invoice: true when its recorded hours changed after send (from the invoice_drift view). Always false for a draft — a draft's staleness is the live-recompute "out of date" note, not post-send drift.

dueDate​

dueDate: string | null

id​

id: string

number​

number: string

pdfPath​

pdfPath: string | null

sentAt​

sentAt: string | null

status​

status: string

totalCents​

totalCents: number


null


lines​

lines: ReconLine[]

Defined in: src/server/services/invoice/weeklyRun.ts:164


periodEndIso​

periodEndIso: string

Defined in: src/server/services/invoice/weeklyRun.ts:162


periodStartIso​

periodStartIso: string

Defined in: src/server/services/invoice/weeklyRun.ts:161


thresholdPct​

thresholdPct: number

Defined in: src/server/services/invoice/weeklyRun.ts:163


totalCents​

totalCents: number

Defined in: src/server/services/invoice/weeklyRun.ts:165