From c4a19b9b5a7d6abb65c853051a90befee81fa980 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 12 Nov 2019 16:27:43 +0800 Subject: [PATCH] [new-owner-report] fix: Payment links to payment split Previously owner-report "Payment" links to APAR payment split. Best link to the transfer account split thereby showing original payment. Also creates a link for each transfer split although theoretically there should only be one. e.g. if 2 non-APAR split in payment transaction, it'll show "Payment Payment" in the "Type" column. --- gnucash/report/business-reports/new-owner-report.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gnucash/report/business-reports/new-owner-report.scm b/gnucash/report/business-reports/new-owner-report.scm index 2c0ed474d2..543f9b8232 100644 --- a/gnucash/report/business-reports/new-owner-report.scm +++ b/gnucash/report/business-reports/new-owner-report.scm @@ -395,10 +395,12 @@ (gnc:invoice-anchor-text invoice) (gncInvoiceGetTypeString invoice)))) ((txn-is-payment? txn) - (gnc:make-html-text - (gnc:html-markup-anchor - (gnc:split-anchor-text split) - (_ "Payment")))) + (apply gnc:make-html-text + (map (lambda (pmt-split) + (gnc:html-markup-anchor + (gnc:split-anchor-text pmt-split) + (_ "Payment"))) + (xaccTransGetPaymentAcctSplitList txn)))) (else (_ "Unknown"))))) (define (invoice->sale invoice)