show the balance report's zero total when -E is used

This commit is contained in:
Simon Michael 2009-04-02 06:22:39 +00:00
parent 9203588d6d
commit 83b0ebf832

View File

@ -129,7 +129,7 @@ showBalanceReport opts args l = acctsstr ++ totalstr
interestingaccts = filter (isInteresting opts l) acctnames
acctnames = sort $ tail $ flatten $ treemap aname accttree
accttree = ledgerAccountTree (depthFromOpts opts) l
totalstr | isZeroMixedAmount total = ""
totalstr | not (Empty `elem` opts) && isZeroMixedAmount total = ""
| otherwise = printf "--------------------\n%s\n" $ padleft 20 $ showMixedAmount total
where
total = sum $ map abalance $ topAccounts l