ui: quick fix for date: and --change breakage (#1387)

This commit is contained in:
Simon Michael 2020-11-14 17:45:27 -08:00
parent 5aedfa6b23
commit 9337a66fb5
2 changed files with 4 additions and 2 deletions

View File

@ -81,8 +81,9 @@ asInit d reset ui@UIState{
as = map asItemAccountName displayitems
uopts' = uopts{cliopts_=copts{reportspec_=rspec'}}
rspec' = rspec{rsQuery=simplifyQuery $ And [rsQuery rspec, excludeforecastq (forecast_ ropts)]}
rspec' = rspec{rsQuery=simplifyQuery $ And [rsQuery rspec, periodq, excludeforecastq (forecast_ ropts)]}
where
periodq = Date $ periodAsDateSpan $ period_ ropts
-- Except in forecast mode, exclude future/forecast transactions.
excludeforecastq (Just _) = Any
excludeforecastq Nothing = -- not:date:tomorrow- not:tag:generated-transaction

View File

@ -67,8 +67,9 @@ rsInit d reset ui@UIState{aopts=_uopts@UIOpts{cliopts_=CliOpts{reportspec_=rspec
inclusive = tree_ ropts || rsForceInclusive
thisacctq = Acct $ (if inclusive then accountNameToAccountRegex else accountNameToAccountOnlyRegex) rsAccount
rspec' = rspec{rsOpts=ropts{depth_=Nothing}}
q = And [rsQuery rspec, excludeforecastq (forecast_ ropts)]
q = And [rsQuery rspec, periodq, excludeforecastq (forecast_ ropts)]
where
periodq = Date $ periodAsDateSpan $ period_ ropts
-- Except in forecast mode, exclude future/forecast transactions.
excludeforecastq (Just _) = Any
excludeforecastq Nothing = -- not:date:tomorrow- not:tag:generated-transaction