2022-09-08 21:53:42 +03:00
|
|
|
-- The balance sheet screen, like the accounts screen but restricted to balance sheet accounts.
|
|
|
|
|
|
|
|
module Hledger.UI.BalancesheetScreen
|
|
|
|
(bsNew
|
|
|
|
,bsUpdate
|
|
|
|
,bsDraw
|
|
|
|
,bsHandle
|
|
|
|
)
|
|
|
|
where
|
|
|
|
|
|
|
|
import Brick hiding (bsDraw)
|
|
|
|
|
|
|
|
import Hledger
|
|
|
|
import Hledger.Cli hiding (mode, progname, prognameandversion)
|
|
|
|
import Hledger.UI.UIOptions
|
|
|
|
import Hledger.UI.UITypes
|
|
|
|
import Hledger.UI.UIUtils
|
|
|
|
import Hledger.UI.UIScreens
|
2022-09-10 05:22:34 +03:00
|
|
|
import Hledger.UI.AccountsScreen (asHandle, asDrawHelper)
|
2022-09-08 21:53:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
bsDraw :: UIState -> [Widget Name]
|
2022-11-08 05:10:56 +03:00
|
|
|
bsDraw ui = dbgui "bsDraw" $ asDrawHelper ui ropts' scrname
|
2022-09-08 21:53:42 +03:00
|
|
|
where
|
2022-11-08 05:10:56 +03:00
|
|
|
scrname = "balance sheet balances"
|
2022-09-09 02:42:29 +03:00
|
|
|
ropts' = (_rsReportOpts $ reportspec_ $ uoCliOpts $ aopts ui){balanceaccum_=Historical}
|
2022-09-08 21:53:42 +03:00
|
|
|
|
|
|
|
bsHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
|
2022-11-01 01:32:57 +03:00
|
|
|
bsHandle = asHandle . dbgui "bsHandle"
|