lib: Fix of a bug with the -H option.

This patch fixes a bug that happened when using the -H option on
a period without any transaction. Previously, the behavior was no
output at all even though it should have shown the previous ending balances
of past transactions. (This is similar to previously using -H with -E,
but with the extra advantage of not showing empty accounts)
This commit is contained in:
Nicholas Niro 2017-07-11 13:49:08 -04:00 committed by Simon Michael
parent f0914ff08e
commit 93fbc0e989

View File

@ -156,7 +156,7 @@ multiBalanceReport opts q j = MultiBalanceReport (displayspans, items, totalsrow
dbg1 "displayedAccts" $
(if tree_ opts then expandAccountNames else id) $
nub $ map (clipOrEllipsifyAccountName depth) $
if empty_ opts then nub $ sort $ startAccts ++ postedAccts else postedAccts
if empty_ opts || (balancetype_ opts) == HistoricalBalance then nub $ sort $ startAccts ++ postedAccts else postedAccts
acctBalChangesPerSpan :: [[(ClippedAccountName, MixedAmount)]] =
dbg1 "acctBalChangesPerSpan"