Bug 766052 - Job report payments wrong when payment contains splits

APAR payment splits must choose from query splits only rather than all
txn splits.
This commit is contained in:
Christopher Lam 2021-06-29 22:36:04 +08:00
parent bcbe7f6ce6
commit 359cc5cad6

View File

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