Skip to main content

Function: buildStatement()

buildStatement(input): Statement

Defined in: src/lib/ar/statement.ts:111

Build the statement for ONE facility. The caller scopes the rows (company + facility) and supplies "today"; nothing here reads a clock or a database.

Fully paid, void, deleted, draft and written-off invoices are all absent by construction — the statement's job is the open balance. (No "recently settled" section: it would need a paid-date the schema doesn't carry, and inventing one from sent_at would misstate the account.)

Parameters​

input​

rows​

readonly StatementInvoiceInput[]

todayIso​

string

Returns​

Statement