[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.
This commit is contained in:
Christopher Lam 2019-11-09 06:14:17 +08:00
parent a4773d2ba7
commit f0701da868

View File

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