gnucash maint: [new-owner-report] invoice->payments displays lot links

Christopher Lam clam at
Mon Dec 23 22:57:43 EST 2019

Updated	 via (commit)
	from (commit)

commit 5ebbb74435e705dca11460535540b50f697ea695
Author: Christopher Lam <christopher.lck at>
Date:   Wed Dec 18 23:59:23 2019 +0800

    [new-owner-report] invoice->payments displays lot links
    Change of algorithm to display invoice->payments.
    Previously: invoice->lot->splitlist; filtered to payments; retrieve
    splits->parent->xaccPaymentAcctSplitList This would find payment
    splits in originating currency.
    But this fails for lot-link txns whose PaymentAcctSplitList is null.
    New algorithm:
    - invoice->lot->split-list, each lot-split analysed
    - TXN-TYPE-PAYMENT lot-splits will query TransferAcct and each will be
    rendered in the originating currency, if they haven't been encountered
    before in this invoice.
    - TXN-TYPE-LINK lot-splits are rendered as a generic 'Offset
    Documents' link to lot-link splits. This helps link invoice to the
    link transaction to locate the corresponding credit-note. It is not
    possible to link to the corresponding credit-note because a
    link-transaction can group many invoices to many credit-notes.
    Increase right-hand-side links from 3 to 4 columns. I think it's quite
    useful to add 'Credit Note' 'Invoice' 'Payment' as a separate

Summary of changes:
 .../report/business-reports/new-owner-report.scm   | 123 ++++++++++++++++++---
 libgnucash/engine/engine.i                         |   1 +
 2 files changed, 108 insertions(+), 16 deletions(-)

More information about the gnucash-patches mailing list