mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
The cash flow report should ignore splits in trading accounts.
This commit is contained in:
parent
dcbeba9ec3
commit
15e9bde7c3
@ -218,8 +218,10 @@
|
|||||||
(lambda (parent-split)
|
(lambda (parent-split)
|
||||||
(let* (
|
(let* (
|
||||||
(psv (xaccSplitGetValue parent-split))
|
(psv (xaccSplitGetValue parent-split))
|
||||||
|
(acct-type (xaccAccountGetType(xaccSplitGetAccount parent-split)))
|
||||||
)
|
)
|
||||||
(if (gnc-numeric-positive-p psv) ;; meaning: if (psv>0)
|
(if (and (gnc-numeric-positive-p psv) ;; meaning: if (psv>0)
|
||||||
|
(not (eq? acct-type ACCT-TYPE-TRADING))) ;; not trading account split
|
||||||
(set! transaction-value
|
(set! transaction-value
|
||||||
(gnc-numeric-add transaction-value psv GNC-DENOM-AUTO GNC-DENOM-LCD)
|
(gnc-numeric-add transaction-value psv GNC-DENOM-AUTO GNC-DENOM-LCD)
|
||||||
)
|
)
|
||||||
@ -253,6 +255,7 @@
|
|||||||
(if (and ;; make sure we don't have
|
(if (and ;; make sure we don't have
|
||||||
(not (null? s-account)) ;; any dangling splits
|
(not (null? s-account)) ;; any dangling splits
|
||||||
(not (account-in-list? s-account accounts))
|
(not (account-in-list? s-account accounts))
|
||||||
|
(not (eq? (xaccAccountGetType s-account) ACCT-TYPE-TRADING)) ;; not trading account
|
||||||
;; only consider splits of opposite sign
|
;; only consider splits of opposite sign
|
||||||
(gnc-numeric-negative-p (gnc-numeric-mul s-value split-value GNC-DENOM-AUTO GNC-DENOM-REDUCE))
|
(gnc-numeric-negative-p (gnc-numeric-mul s-value split-value GNC-DENOM-AUTO GNC-DENOM-REDUCE))
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user