Reconcile invoices
Before reconciling, require invoice_id, amount, and currency in both files. If headers are missing, ask for a column mapping. This is an operational precondition for reconciliation, not a separate invocation condition.
- Match invoice_id exactly, then compare currency and amount to two decimal places.
- Mark multiple candidate payments as ambiguous instead of choosing the first row.
- Return a table of paid, unpaid, and ambiguous invoices with row numbers.