Interface: RunKpis
Defined in: src/lib/invoice/run.ts:95
Roll-up KPIs for one weekly billing run, summarizing a set of FacilityRunRows by status.
All *Cents fields are integer cents. Produced by aggregateKpis.
Per-status accounting (see aggregateKpis for the exact rules):
readyandreviewamounts both contribute tobillableCents(in flight, not yet sent).gapandnonerows contribute to their counts only — never to any*Centstotal.sentamounts are tracked separately insentCentsand are NOT part ofbillableCents.
Properties
billableCents
billableCents:
number
Defined in: src/lib/invoice/run.ts:97
Billable this week = sum of ready + review amounts (what is in flight, not yet sent). Cents.
gapCount
gapCount:
number
Defined in: src/lib/invoice/run.ts:107
Count of facilities with status === 'gap' (no amount accrued).
noneCount
noneCount:
number
Defined in: src/lib/invoice/run.ts:115
Count of facilities with status === 'none' (nothing to bill).
pausedCount
pausedCount:
number
Defined in: src/lib/invoice/run.ts:109
Count of facilities with status === 'paused' (billing paused this week; no amount accrued).
readyCents
readyCents:
number
Defined in: src/lib/invoice/run.ts:101
Sum of billableAmountCents over ready facilities. Cents.
readyCount
readyCount:
number
Defined in: src/lib/invoice/run.ts:99
Count of facilities with status === 'ready'.
reviewCents
reviewCents:
number
Defined in: src/lib/invoice/run.ts:105
Sum of billableAmountCents over review facilities. Cents.
reviewCount
reviewCount:
number
Defined in: src/lib/invoice/run.ts:103
Count of facilities with status === 'review'.
sentCents
sentCents:
number
Defined in: src/lib/invoice/run.ts:113
Sum of billableAmountCents over already-sent facilities (excluded from billableCents). Cents.
sentCount
sentCount:
number
Defined in: src/lib/invoice/run.ts:111
Count of facilities with status === 'sent'.
total
total:
number
Defined in: src/lib/invoice/run.ts:117
Total number of facility rows aggregated (equals rows.length).