Interface: OutstandingInvoiceView
Defined in: src/server/services/checks.ts:25
Pure check-to-invoice reconciliation (no I/O).
Allocates a received check across a facility's outstanding invoices in the given order (the caller passes them oldest-first), fully paying each until the check is exhausted; the final touched invoice may be partial. Corrections over the spec's matcher (build plan §3):
- An invoice is
fullyPaidiff the amount applied equals ITS outstanding balance — so a check that fully pays invoice #1 and partially pays #2 marks #1 paid and #2 partial (the spec's "applications.length === 1" heuristic got this wrong). - All math is in integer cents (no
remaining > 0.01float compares). - An empty invoice list is handled (whole check is leftover/credit). Reconciliation only SUGGESTS; an admin confirms before anything is applied.
Extends
Properties
dueDate
readonlydueDate:string|null
Defined in: src/server/services/checks.ts:28
invoiceId
readonlyinvoiceId:string
Defined in: src/lib/reconcile/index.ts:16
Inherited from
invoiceNumber
readonlyinvoiceNumber:string
Defined in: src/server/services/checks.ts:26
outstandingCents
readonlyoutstandingCents:number
Defined in: src/lib/reconcile/index.ts:18
Remaining balance (invoice total − amount already paid), in cents; values ≤ 0 are skipped.
Inherited from
OutstandingInvoice.outstandingCents
periodEnd
readonlyperiodEnd:string|null
Defined in: src/server/services/checks.ts:27