Interface: InvoiceShelfData
Defined in: src/server/services/invoice/weeklyRun.ts:143
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:144
facilityName
facilityName:
string
Defined in: src/server/services/invoice/weeklyRun.ts:145
hasBillingContact
hasBillingContact:
boolean
Defined in: src/server/services/invoice/weeklyRun.ts:153
hasMissingRate
hasMissingRate:
boolean
Defined in: src/server/services/invoice/weeklyRun.ts:152
hasUnapproved
hasUnapproved:
boolean
Defined in: src/server/services/invoice/weeklyRun.ts:151
invoice
invoice: {
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:154
lines
lines:
ReconLine[]
Defined in: src/server/services/invoice/weeklyRun.ts:149
periodEndIso
periodEndIso:
string
Defined in: src/server/services/invoice/weeklyRun.ts:147
periodStartIso
periodStartIso:
string
Defined in: src/server/services/invoice/weeklyRun.ts:146
thresholdPct
thresholdPct:
number
Defined in: src/server/services/invoice/weeklyRun.ts:148
totalCents
totalCents:
number
Defined in: src/server/services/invoice/weeklyRun.ts:150