From 6210613f764c531e4e44d897d858daddeebf7652 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 18 Jan 2018 12:00:16 -0800 Subject: [PATCH] bs/bse/cf/is: show overall report span in title --- hledger/Hledger/Cli/CompoundBalanceCommand.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/CompoundBalanceCommand.hs b/hledger/Hledger/Cli/CompoundBalanceCommand.hs index 8df762194..69ad93b2c 100644 --- a/hledger/Hledger/Cli/CompoundBalanceCommand.hs +++ b/hledger/Hledger/Cli/CompoundBalanceCommand.hs @@ -133,9 +133,10 @@ compoundBalanceCommand CompoundBalanceCommandSpec{..} opts@CliOpts{command_=cmd, "change":_ -> Just PeriodChange _ -> Nothing balancetype = fromMaybe cbctype mBalanceTypeOverride - -- when user overrides, add an indication to the report title - title = cbctitle ++ maybe "" (' ':) mtitleclarification + title = cbctitle ++ " " ++ showDateSpan requestedspan ++ maybe "" (' ':) mtitleclarification where + requestedspan = queryDateSpan (date2_ ropts) userq `spanDefaultsFrom` journalDateSpan (date2_ ropts) j + -- when user overrides, add an indication to the report title mtitleclarification = flip fmap mBalanceTypeOverride $ \t -> case t of PeriodChange -> "(Balance Changes)"