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.
This commit is contained in:
Simon Michael 2013-09-23 11:05:18 -07:00
parent 7bfd3268f7
commit eb5e2f95e9

View File

@ -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
[
]