Please sign in to comment.
[FIX] account: reconcile payments against min date_maturity journal item
1. Create a payment term with: - 50% due now - balance due in 14 days 2. Validate an invoice with this payment term and partner Agrolait 3. Create a payment from Agrolait with the 50% due 4. Add this outstanding credit to the invoice It is reconciled with the balance due in 14 days instead of what is due now. Because of this e.g. the Aged Receivable report will show the customer being overdue with a payment. This issue was first fixed in 9.0 at adad192. It was then reintroduced in saas-11.4 at d3d2612. This commit adds a test to avoid regressions like this. To fix the issue this sorts journal items by their Due Date if there is one. Otherwise we use the date from the journal entry as before. Note that before this commit journal items were not sorted at all by the two 'sorted' statements. sorted returns a sorted recordset, it doesn't modify the recordset it's called on. opw-1906665
- Loading branch information...
Showing with 62 additions and 2 deletions.