Bug 797521 - Receivable Aging (beta): prepayments logic doesn't work, appears to use incorrect absolute value logic

Overpayments create at least 2 APAR splits (1 for each invoice, and 1
for the overpayment), they were processed multiple times.

Modify query to return unique transactions, thereby ensuring a payment
gets processed once only.
This commit is contained in:
Christopher Lam 2019-12-10 18:23:30 +08:00
parent 60765e388a
commit 3efb960daf

View File

@ -235,7 +235,7 @@ exist but have no suitable transactions."))
(else
(setup-query query accounts report-date)
(let* ((splits (qof-query-run query))
(let* ((splits (xaccQueryGetSplitsUniqueTrans query))
(accounts (sort-and-delete-duplicates (map xaccSplitGetAccount splits)
gnc:account-path-less-p equal?)))
(qof-query-destroy query)