From 43fab24e2c0c787b178f472e3a2ca359f93a245e Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 15 Dec 2019 21:16:45 +0800 Subject: [PATCH] Bug 797521 - Receivable Aging (beta): include earliest split When processing invoice->payments, we used gnc-lot-get-earliest-split to find the lot opening-split to skip it. However it does not always return the lot opening-split, because a lot-reducing split may be dated earlier than the lot opening-split. This change means that the posting-split is processed together with the payment splits, but its PaymentAcctSplitList is null, so it does not add any row to the result. --- gnucash/report/business-reports/new-owner-report.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnucash/report/business-reports/new-owner-report.scm b/gnucash/report/business-reports/new-owner-report.scm index 0379f5ec60..eaf426adff 100644 --- a/gnucash/report/business-reports/new-owner-report.scm +++ b/gnucash/report/business-reports/new-owner-report.scm @@ -309,8 +309,7 @@ (define (make-invoice->payments-table invoice) (define lot (gncInvoiceGetPostedLot invoice)) - (let lp ((invoice-splits (delete (gnc-lot-get-earliest-split lot) - (gnc-lot-get-split-list lot))) + (let lp ((invoice-splits (gnc-lot-get-split-list lot)) (result '())) (match invoice-splits ;; finished. test for underpayment and add outstanding balance