I have the following situation:
- On day 1, customer X buys some products. I send an invoice A with total amount Y and a payment term of 60 days.
- On day 30, customer X comes back and buys the same products again, so I send an invoice B with total amount Y and a payment term of 60 days.
- On day 40, customer X pays invoice A
- I export the bank statement and import it into Tryton
- I start the reconcile wizard to reconcile the invoice
The (nasty) problem is that the wizard takes invoice B to be reconciled. This means that the customer 70 days later is asked to pay invoice A, which he already did. And because the amounts of the invoices are the same it is overlooked easily.
Is this something which can be enhanced in the code with a date sorting?