Function: computeCheckTargeting()
computeCheckTargeting(
companyId,check):Promise<CheckTargeting>
Defined in: src/server/services/checks.ts:192
Shared targeting used by BOTH the live UI preview and the authoritative confirm: resolve the payer's
facility set, pool its outstanding invoices, and order them by remittance match (date + amount, INV
tiebreak). The amount is intentionally NOT applied here — allocateCheck runs over the returned
order separately, so the preview and the confirm always agree on ordering.
Parameters
companyId
string
check
Returns
Promise<CheckTargeting>