-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters