gnucash maint: Bug 766052 - Job report payments wrong when payment contains splits
Christopher Lam
clam at code.gnucash.org
Wed Jun 30 06:53:08 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/359cc5ca (commit)
from https://github.com/Gnucash/gnucash/commit/bcbe7f6c (commit)
commit 359cc5cad6d55859b3bdb26afb38e2c67db461f4
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Jun 29 22:36:04 2021 +0800
Bug 766052 - Job report payments wrong when payment contains splits
APAR payment splits must choose from query splits only rather than all
txn splits.
diff --git a/gnucash/report/reports/standard/new-owner-report.scm b/gnucash/report/reports/standard/new-owner-report.scm
index 9f70b4f90..8aaacb6a0 100644
--- a/gnucash/report/reports/standard/new-owner-report.scm
+++ b/gnucash/report/reports/standard/new-owner-report.scm
@@ -844,7 +844,10 @@
(let* ((split (car splits))
(txn (xaccSplitGetParent split))
(date (xaccTransGetDate txn))
- (orig-value (xaccTransGetAccountAmount txn acc))
+ (orig-value
+ (fold (lambda (a b)
+ (if (equal? txn (xaccSplitGetParent a))
+ (+ b (xaccSplitGetAmount a)) b)) 0 splits))
(value (AP-negate orig-value)))
(add-row
Summary of changes:
gnucash/report/reports/standard/new-owner-report.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list