lib: When performing a summary posting report without depth limiting,
report exclusive balances rather than inclusive balances (#1568).
This commit is contained in:
parent
b114571d26
commit
0df3a4714f
@ -212,7 +212,7 @@ summarisePostingsInDateSpan (DateSpan b e) wd mdepth showempty ps
|
|||||||
balance a = maybe nullmixedamt bal $ lookupAccount a accts
|
balance a = maybe nullmixedamt bal $ lookupAccount a accts
|
||||||
where
|
where
|
||||||
bal = if isclipped a then aibalance else aebalance
|
bal = if isclipped a then aibalance else aebalance
|
||||||
isclipped a = maybe True (accountNameLevel a >=) mdepth
|
isclipped a = maybe False (accountNameLevel a >=) mdepth
|
||||||
|
|
||||||
negatePostingAmount :: Posting -> Posting
|
negatePostingAmount :: Posting -> Posting
|
||||||
negatePostingAmount = postingTransformAmount negate
|
negatePostingAmount = postingTransformAmount negate
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
<
|
<
|
||||||
2011/2/1
|
2011/2/1
|
||||||
(a) 1
|
(a) 1
|
||||||
|
(a:b) 1
|
||||||
|
|
||||||
$ hledger -f- register --period 'monthly'
|
$ hledger -f- register --period 'monthly'
|
||||||
2011-02 a 1 1
|
2011-02 a 1 1
|
||||||
|
a:b 1 2
|
||||||
|
|
||||||
# 2. or with a query pattern, just the intervals with matched data:
|
# 2. or with a query pattern, just the intervals with matched data:
|
||||||
<
|
<
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user