Function: matchBasisIndex()
matchBasisIndex(
checks):Map<string,string>
Defined in: src/db/queries/ar.ts:210
match_basis is NOT a column on check_payment_applications — it lives on the remittance LINE
inside check_payments.remittance_lines (0049), merged there at confirm time. Index it per
(check, invoice) so each application can find the basis that chose it; an application with no
line (a check confirmed before the ref-first matcher existed) stays null, which is precisely
the ledger's cause #5 signal.
Parameters
checks
readonly CheckDbRow[]
Returns
Map<string, string>