hledger-1.2: Command-line interface for the hledger accounting tool

Safe Haskell | None
Language | Haskell2010

Hledger.Cli.BalanceView

Description

This module is used by the `balancesheet`, `incomestatement`, and `cashflow` commands to print out acocunt balances based on a specific "view", which consists of a title and multiple named queries that are aggregated and totaled.

Synopsis

- data BalanceView = BalanceView {
  - bvmode :: String
  - bvaliases :: [String]
  - bvhelp :: String
  - bvtitle :: String
  - bvqueries :: [(String, Journal -> Query)]
  - bvtype :: BalanceType
  }
- balanceviewmode :: BalanceView -> Mode RawOpts
- balanceviewReport :: BalanceView -> CliOpts -> Journal -> IO ()

# Documentation

data BalanceView Source #

Describes a view for the balance, which can consist of multiple separate named queries that are aggregated and totaled.

Constructors

BalanceView |

Fields

- bvmode :: String

  command line mode of the view

- bvaliases :: [String]

  command line aliases

- bvhelp :: String

  command line help message

- bvtitle :: String

  title of the view

- bvqueries :: [(String, Journal -> Query)]

  named queries that make up the view

- bvtype :: BalanceType

  the type of balance this view shows. This overrides user input.

balanceviewmode :: BalanceView -> Mode RawOpts Source #

balanceviewReport :: BalanceView -> CliOpts -> Journal -> IO () Source #

Prints out a balance report according to a given view