ui: register: show all txns in/under an account at depth limit (#1468)

As in 1.19. This was broken since 2020-09-02 c45663d41.
This commit is contained in:
Simon Michael 2021-01-24 09:53:50 -08:00
parent 08c5857ac9
commit 507648383d

View File

@ -65,10 +65,19 @@ rsInit d reset ui@UIState{aopts=_uopts@UIOpts{cliopts_=CliOpts{reportspec_=rspec
-- XXX temp -- XXX temp
inclusive = tree_ ropts || rsForceInclusive inclusive = tree_ ropts || rsForceInclusive
thisacctq = Acct $ (if inclusive then accountNameToAccountRegex else accountNameToAccountOnlyRegex) rsAccount thisacctq = Acct $ (if inclusive then accountNameToAccountRegex else accountNameToAccountOnlyRegex) rsAccount
ropts' = ropts {
rspec' = rspec{rsOpts=ropts{depth_=Nothing}} -- ignore any depth limit, as in postingsReport; allows register's total to match accounts screen
depth_=Nothing
-- XXX aregister also has this, needed ?
-- always show historical balance
-- , balancetype_= HistoricalBalance
}
-- regenerate the ReportSpec, making sure to use the above
rspec' = rspec{ rsQuery=simplifyQuery $ queryFromFlags ropts'
, rsOpts=ropts'
}
-- Further restrict the query based on the current period and future/forecast mode. -- Further restrict the query based on the current period and future/forecast mode.
q = simplifyQuery $ And [rsQuery rspec, periodq, excludeforecastq (forecast_ ropts)] q = simplifyQuery $ And [rsQuery rspec', periodq, excludeforecastq (forecast_ ropts)]
where where
periodq = Date $ periodAsDateSpan $ period_ ropts periodq = Date $ periodAsDateSpan $ period_ ropts
-- Except in forecast mode, exclude future/forecast transactions. -- Except in forecast mode, exclude future/forecast transactions.