Match payments to invoices, partials, and unidentified receipts — with cases for what does not clear.