mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 04:46:31 +03:00
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:
parent
7bfd3268f7
commit
eb5e2f95e9
@ -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
|
||||
[
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user