mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -844,7 +844,10 @@
|
|||||||
(let* ((split (car splits))
|
(let* ((split (car splits))
|
||||||
(txn (xaccSplitGetParent split))
|
(txn (xaccSplitGetParent split))
|
||||||
(date (xaccTransGetDate txn))
|
(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)))
|
(value (AP-negate orig-value)))
|
||||||
|
|
||||||
(add-row
|
(add-row
|
||||||
|
|||||||
Reference in New Issue
Block a user