;web: ensure sidebar accounts are in tree mode, fixing a regression

This commit is contained in:
Simon Michael 2020-07-31 18:02:38 -07:00
parent 2ba7bb0428
commit 7df9a40750

View File

@ -119,8 +119,10 @@ instance Yesod App where
hideEmptyAccts <- (== Just "1") . lookup "hideemptyaccts" . reqCookies <$> getRequest
let ropts = reportopts_ (cliopts_ opts)
-- flip the default for items with zero amounts, show them by default
ropts' = ropts { empty_ = not (empty_ ropts) }
ropts' = ropts
{accountlistmode_ = ALTree -- force tree mode for sidebar
,empty_ = not (empty_ ropts) -- show zero items by default
}
accounts =
balanceReportAsHtml (JournalR, RegisterR) here hideEmptyAccts j q qopts $
balanceReport ropts' m j