mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 05:11:33 +03:00
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
|
||||
where
|
||||
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 = postingTransformAmount negate
|
||||
|
@ -1,10 +1,12 @@
|
||||
# 1. monthly reporting interval, no end dates, shows just the intervals with data:
|
||||
<
|
||||
2011/2/1
|
||||
(a) 1
|
||||
(a) 1
|
||||
(a:b) 1
|
||||
|
||||
$ hledger -f- register --period 'monthly'
|
||||
2011-02 a 1 1
|
||||
a:b 1 2
|
||||
|
||||
# 2. or with a query pattern, just the intervals with matched data:
|
||||
<
|
||||
|
Loading…
Reference in New Issue
Block a user