Why combined payments are difficult
A payment may cover recent invoices, selected overdue balances, or a mix that reflects the customer's remittance advice. Simple amount matching fails because no individual invoice equals the payment. Manual spreadsheet work can also produce several mathematical combinations when many balances are similar.
The best candidate is therefore not just the first set that adds correctly. It should use a narrowed pool and explain why those invoices belong together.
Narrow first, then search combinations
Begin with the payer or known customer alias, compatible currency, date window, open status, and any invoice references found in the memo. Then run a bounded subset search on that smaller list. Limits on candidate count and combination size prevent the search from growing without control.
If more than one combination totals the payment, return an ambiguity for review. Reference evidence or remittance details may separate the candidates.
- Restrict by customer or payer alias
- Keep currencies separate
- Prefer referenced and recent invoices
- Show all plausible exact combinations within the limit
Confirm the allocation, not only the total
The reviewer should see each chosen invoice, its open balance, and the amount applied. Confirming creates one payment-to-many-invoices relationship and preserves the automated explanation in the audit log.
If the customer paid only part of one invoice within the group, the remaining balance must stay open. A combined payment can contain both full and partial applications.