[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.
pull/602/head
Christopher Lam 7 years ago
parent 0b8bfe6683
commit c4a19b9b5a

@ -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)

Loading…
Cancel
Save