Function: sendFacilityStatement()
sendFacilityStatement(
input):Promise<StatementActionResult>
Defined in: src/server/actions/ar.ts:151
Email a facility its account statement — the open invoices, what they have paid, what is overdue, and any accrued interest — with copies of the selected invoices attached (design §12.5).
Billing-domain staff, not owner-only: it is a reconciliation document, the same conversation as sending the invoice itself. The statement is built from FRESH server-side reads; the panel's row list is a picker, never the source of what is owed.
The statement activity is written only when the provider accepted the email. A skipped or
failed delivery leaves no row: an evidence log that records statements nobody received is worse
than no log at all — the next collection call would be built on it.
Parameters
input
input
Returns
Promise<StatementActionResult>