From eb5e2f95e9c601ade000bdefb40ce2b9184cb173 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 23 Sep 2013 11:05:18 -0700 Subject: [PATCH] cashflow: don't ignore the report start date (fixed #135) Odd, there may have been s reason to do this but I can't remember it. --- hledger/Hledger/Cli/Cashflow.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hledger/Hledger/Cli/Cashflow.hs b/hledger/Hledger/Cli/Cashflow.hs index 09be714fe..1fa1da1df 100644 --- a/hledger/Hledger/Cli/Cashflow.hs +++ b/hledger/Hledger/Cli/Cashflow.hs @@ -27,7 +27,7 @@ cashflow :: CliOpts -> Journal -> IO () cashflow CliOpts{reportopts_=ropts} j = do -- let lines = case formatFromOpts ropts of Left err, Right ... d <- getCurrentDay - let q = queryFromOpts d (withoutBeginDate ropts) + let q = queryFromOpts d ropts cashreport@(_,total) = accountsReport ropts (And [q, journalCashAccountQuery j]) j -- operatingreport@(_,operating) = accountsReport ropts (And [q, journalOperatingAccountMatcher j]) j -- investingreport@(_,investing) = accountsReport ropts (And [q, journalInvestingAccountMatcher j]) j @@ -43,11 +43,6 @@ Total: #{padleft 20 $ showMixedAmountWithoutPrice total} |] -withoutBeginDate :: ReportOpts -> ReportOpts -withoutBeginDate ropts@ReportOpts{..} = ropts{begin_=Nothing, period_=p} - where p = case period_ of Nothing -> Nothing - Just (i, DateSpan _ e) -> Just (i, DateSpan Nothing e) - tests_Hledger_Cli_Cashflow = TestList [ ]