From 1f2c11d1bceb3997cd9d8e868f3165d20e3ef182 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 10 Oct 2021 11:07:15 -1000 Subject: [PATCH] ui: fix breakage from "areg: begin respecting --date2" (#1731) --- hledger-ui/Hledger/UI/RegisterScreen.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger-ui/Hledger/UI/RegisterScreen.hs b/hledger-ui/Hledger/UI/RegisterScreen.hs index 7a6f314b3..b7d5cb6b4 100644 --- a/hledger-ui/Hledger/UI/RegisterScreen.hs +++ b/hledger-ui/Hledger/UI/RegisterScreen.hs @@ -72,6 +72,7 @@ rsInit d reset ui@UIState{aopts=_uopts@UIOpts{uoCliOpts=copts@CliOpts{reportspec -- always show historical balance -- , balanceaccum_= Historical } + wd = whichDate ropts' rspec' = reportSpecSetFutureAndForecast d (forecast_ $ inputopts_ copts) . either (error "rsInit: adjusting the query for register, should not have failed") id $ -- PARTIAL: updateReportSpec ropts' rspec{_rsDay=d} @@ -84,7 +85,7 @@ rsInit d reset ui@UIState{aopts=_uopts@UIOpts{uoCliOpts=copts@CliOpts{reportspec displayitems = map displayitem items' where displayitem (t, _, _issplit, otheracctsstr, change, bal) = - RegisterScreenItem{rsItemDate = showDate $ transactionRegisterDate (_rsQuery rspec') thisacctq t + RegisterScreenItem{rsItemDate = showDate $ transactionRegisterDate wd (_rsQuery rspec') thisacctq t ,rsItemStatus = tstatus t ,rsItemDescription = tdescription t ,rsItemOtherAccounts = otheracctsstr