Skip to main content

Interface: RunKpis

Defined in: src/lib/invoice/run.ts:87

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):

  • ready and review amounts both contribute to billableCents (in flight, not yet sent).
  • gap and none rows contribute to their counts only — never to any *Cents total.
  • sent amounts are tracked separately in sentCents and are NOT part of billableCents.

Properties

billableCents

billableCents: number

Defined in: src/lib/invoice/run.ts:89

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:99

Count of facilities with status === 'gap' (no amount accrued).


noneCount

noneCount: number

Defined in: src/lib/invoice/run.ts:105

Count of facilities with status === 'none' (nothing to bill).


readyCents

readyCents: number

Defined in: src/lib/invoice/run.ts:93

Sum of billableAmountCents over ready facilities. Cents.


readyCount

readyCount: number

Defined in: src/lib/invoice/run.ts:91

Count of facilities with status === 'ready'.


reviewCents

reviewCents: number

Defined in: src/lib/invoice/run.ts:97

Sum of billableAmountCents over review facilities. Cents.


reviewCount

reviewCount: number

Defined in: src/lib/invoice/run.ts:95

Count of facilities with status === 'review'.


sentCents

sentCents: number

Defined in: src/lib/invoice/run.ts:103

Sum of billableAmountCents over already-sent facilities (excluded from billableCents). Cents.


sentCount

sentCount: number

Defined in: src/lib/invoice/run.ts:101

Count of facilities with status === 'sent'.


total

total: number

Defined in: src/lib/invoice/run.ts:107

Total number of facility rows aggregated (equals rows.length).