Skip to main content

Function: lineAmountCaps()

lineAmountCaps(lines): Map<string, number>

Defined in: src/lib/reconcile/index.ts:83

Per-invoice application caps from matched remittance lines: the payer's stated line amount is how much of the check they put on that invoice. One shared definition so the on-screen preview and the server-side confirm recompute identically (the confirm refuses on any mismatch). Zero/negative amounts are noise, not caps; unmatched lines cap nothing.

Relies on targeting's at-most-one-line-per-invoice invariant (consumed in target.ts): a repeated invoiceId here is last-write-wins, so two lines naming one invoice would under-cap, not sum.

Parameters​

lines​

readonly object[]

Returns​

Map<string, number>