Skip to main content

Function: allocationPlan()

allocationPlan(targeting, pool): OutstandingInvoice[]

Defined in: src/lib/reconcile/target.ts:287

The finished plan allocateCheck consumes: the targeting order joined with each invoice's outstanding balance and its ADR-0054 short-pay cap (the payer's stated line amount). Built in ONE place so the on-screen preview and the server confirm cannot disagree on order or caps — the confirm refuses on any allocation mismatch, so a second cap definition would refuse every submit.

Parameters​

targeting​

TargetingResult

pool​

readonly CandidateInvoice[]

Returns​

OutstandingInvoice[]