mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-18 17:57:11 +03:00
Fixing bs/is/cf --flat regressions (#566)
* fixing bs/is/cf --flat regressions * fixed Tree forcing for non-period reports
This commit is contained in:
parent
30a018337c
commit
6857cd64a8
@ -168,6 +168,19 @@ balanceviewReport BalanceView{..} CliOpts{command_=cmd, reportopts_=ropts, rawop
|
||||
PeriodChange -> "(Balance Changes)"
|
||||
CumulativeChange -> "(Cumulative Ending Balances)"
|
||||
HistoricalBalance -> "(Historical Ending Balances)"
|
||||
ropts' = ropts { balancetype_ = balancetype }
|
||||
ropts' = treeIfNotPeriod $ ropts { balancetype_ = balancetype }
|
||||
-- For --historical/--cumulative, we must use multiBalanceReport.
|
||||
-- (This forces --no-elide.)
|
||||
-- These settings format the output in a way that we can convert to
|
||||
-- a normal balance report using singleBalanceReport. See
|
||||
-- Balance.hs for more information.
|
||||
treeIfNotPeriod
|
||||
| flat_ ropts = id
|
||||
| otherwise = case (balancetype, interval_ ropts) of
|
||||
(HistoricalBalance, NoInterval) -> \o ->
|
||||
o { accountlistmode_ = ALTree }
|
||||
(CumulativeChange , NoInterval) -> \o ->
|
||||
o { accountlistmode_ = ALTree }
|
||||
_ -> id
|
||||
merging (Table hLeft hTop dat) (Table hLeft' _ dat') =
|
||||
Table (T.Group DoubleLine [hLeft, hLeft']) hTop (dat ++ dat')
|
||||
|
Loading…
Reference in New Issue
Block a user