From f0701da8685ec0b8bbd593099a561fb9cc60503f Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 9 Nov 2019 06:14:17 +0800 Subject: [PATCH] [new-owner-report] modify report row->value accessor Previously each owner-table row's value would access split's amount. But this fails for payments spanning multiple invoices, because these (with a single split to bank) will have a split for each invoice. Hence split->amount gets only 1 invoice payment amount. This change modifies to obtain the sum total of split->amounts in the APAR account thus handles multi-invoice payments correctly. --- gnucash/report/business-reports/new-owner-report.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/report/business-reports/new-owner-report.scm b/gnucash/report/business-reports/new-owner-report.scm index 549601f784..c99dee1943 100644 --- a/gnucash/report/business-reports/new-owner-report.scm +++ b/gnucash/report/business-reports/new-owner-report.scm @@ -447,7 +447,7 @@ (let* ((split (car splits)) (txn (xaccSplitGetParent split)) (date (xaccTransGetDate txn)) - (value (xaccSplitGetAmount split)) + (value (xaccTransGetAccountValue txn acc)) (value (if payable? (- value) value)) (invoice (gncInvoiceGetInvoiceFromTxn txn)) (invoice-splits