diff --git a/hledger-ui/Hledger/UI/AccountsScreen.hs b/hledger-ui/Hledger/UI/AccountsScreen.hs index cb416381c..bdb821559 100644 --- a/hledger-ui/Hledger/UI/AccountsScreen.hs +++ b/hledger-ui/Hledger/UI/AccountsScreen.hs @@ -68,10 +68,7 @@ asInit d reset ui@UIState{ mexactmatch = findIndex ((a ==) . asItemAccountName) displayitems mprefixmatch = findIndex ((a `isAccountNamePrefixOf`) . asItemAccountName) displayitems uopts' = uopts{cliopts_=copts{reportopts_=ropts'}} - ropts' = ropts { - -- XXX balanceReport doesn't respect this yet - balancetype_=HistoricalBalance - } + ropts' = ropts{accountlistmode_=if flat_ ropts then ALFlat else ALTree} q = queryFromOpts d ropts @@ -82,7 +79,7 @@ asInit d reset ui@UIState{ valuedate = fromMaybe d $ queryEndDate False q -- run the report - (items,_total) = convert $ balanceReport ropts' q j + (items,_total) = convert $ singleBalanceReport ropts' q j -- pre-render the list items displayitem (fullacct, shortacct, indent, bal) = diff --git a/hledger-ui/Hledger/UI/Main.hs b/hledger-ui/Hledger/UI/Main.hs index 895ca5fe8..44fcf30e0 100644 --- a/hledger-ui/Hledger/UI/Main.hs +++ b/hledger-ui/Hledger/UI/Main.hs @@ -84,7 +84,9 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do -- show items with zero amount by default, unlike the CLI empty_=True, -- always disable boring account name eliding, unlike the CLI, for a more regular tree - no_elide_=True + no_elide_=True, + -- always show historical balances, regardless of report start date + balancetype_=HistoricalBalance } } }