show colorized amounts for totals of bs/is/cf (#567)
This commit is contained in:
parent
995fcbeaf5
commit
54d33ce028
@ -129,7 +129,7 @@ balanceviewReport BalanceView{..} CliOpts{command_=cmd, reportopts_=ropts, rawop
|
|||||||
unless (no_total_ ropts' || cmd=="cashflow") . mapM_ putStrLn $ -- TODO temp
|
unless (no_total_ ropts' || cmd=="cashflow") . mapM_ putStrLn $ -- TODO temp
|
||||||
[ "Total:"
|
[ "Total:"
|
||||||
, "--------------------"
|
, "--------------------"
|
||||||
, padleft 20 $ showMixedAmountWithoutPrice (getSum amt)
|
, padLeftWide 20 $ showamt (getSum amt)
|
||||||
]
|
]
|
||||||
_ -> do
|
_ -> do
|
||||||
let (tabls, amts, Sum totsum)
|
let (tabls, amts, Sum totsum)
|
||||||
@ -154,6 +154,8 @@ balanceviewReport BalanceView{..} CliOpts{command_=cmd, reportopts_=ropts, rawop
|
|||||||
putStrLn title
|
putStrLn title
|
||||||
putStrLn $ renderBalanceReportTable ropts totTabl
|
putStrLn $ renderBalanceReportTable ropts totTabl
|
||||||
where
|
where
|
||||||
|
showamt | color_ ropts = cshowMixedAmountWithoutPrice
|
||||||
|
| otherwise = showMixedAmountWithoutPrice
|
||||||
overwriteBalanceType =
|
overwriteBalanceType =
|
||||||
case reverse $ filter (`elem` ["change","cumulative","historical"]) $ map fst raw of
|
case reverse $ filter (`elem` ["change","cumulative","historical"]) $ map fst raw of
|
||||||
"historical":_ -> Just HistoricalBalance
|
"historical":_ -> Just HistoricalBalance
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user