Function: availableTransfers()
availableTransfers<
T>(transfers,__namedParameters):T[]
Defined in: src/lib/wise/reconcile.ts:117
A Wise transfer funds exactly ONE payment, globally. The Wise profile is shared across tenants, so exclude transfers already linked to a payment (ANY company) before matching — otherwise the amount/date-window fallback could match one tenant's transfer to another tenant's open payment and mark the wrong contractor paid. EXCEPTION: keep a transfer linked to one of THIS company's own still-open payments — an in-flight payment (transfer stamped on a prior run) must be able to re-match its own transfer and advance to completed (reconcile is the sole completer).
Type Parameters
T
T extends object
Parameters
transfers
readonly T[]
__namedParameters
linked
ReadonlySet<string>
openOwn
ReadonlySet<string>
Returns
T[]