Revert "The cash flow report should ignore splits in trading accounts."

This reverts commit 15e9bde7c3.
See bug 622778 and 722140 for more details.
This commit is contained in:
Geert Janssens 2014-08-01 11:35:47 +02:00
parent 13ef7eec6e
commit f34c4e0f2f

View File

@ -218,10 +218,8 @@
(lambda (parent-split)
(let* (
(psv (xaccSplitGetValue parent-split))
(acct-type (xaccAccountGetType(xaccSplitGetAccount parent-split)))
)
(if (and (gnc-numeric-positive-p psv) ;; meaning: if (psv>0)
(not (eq? acct-type ACCT-TYPE-TRADING))) ;; not trading account split
(if (gnc-numeric-positive-p psv) ;; meaning: if (psv>0)
(set! transaction-value
(gnc-numeric-add transaction-value psv GNC-DENOM-AUTO GNC-DENOM-LCD)
)
@ -255,7 +253,6 @@
(if (and ;; make sure we don't have
(not (null? s-account)) ;; any dangling splits
(not (account-in-list? s-account accounts))
(not (eq? (xaccAccountGetType s-account) ACCT-TYPE-TRADING)) ;; not trading account
;; only consider splits of opposite sign
(gnc-numeric-negative-p (gnc-numeric-mul s-value split-value GNC-DENOM-AUTO GNC-DENOM-REDUCE))
)