Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hledger.Reports.ReportOptions
Contents
Description
Options common to most hledger reports.
- data ReportOpts = ReportOpts {
- period_ :: Period
- interval_ :: Interval
- clearedstatus_ :: Maybe ClearedStatus
- cost_ :: Bool
- depth_ :: Maybe Int
- display_ :: Maybe DisplayExp
- date2_ :: Bool
- empty_ :: Bool
- no_elide_ :: Bool
- real_ :: Bool
- format_ :: Maybe FormatStr
- query_ :: String
- average_ :: Bool
- related_ :: Bool
- balancetype_ :: BalanceType
- accountlistmode_ :: AccountListMode
- drop_ :: Int
- row_total_ :: Bool
- no_total_ :: Bool
- value_ :: Bool
- pretty_tables_ :: Bool
- data BalanceType
- data AccountListMode
- type FormatStr = String
- defreportopts :: ReportOpts
- rawOptsToReportOpts :: RawOpts -> IO ReportOpts
- checkReportOpts :: ReportOpts -> ReportOpts
- flat_ :: ReportOpts -> Bool
- tree_ :: ReportOpts -> Bool
- whichDateFromOpts :: ReportOpts -> WhichDate
- journalSelectingAmountFromOpts :: ReportOpts -> Journal -> Journal
- queryFromOpts :: Day -> ReportOpts -> Query
- queryFromOptsOnly :: Day -> ReportOpts -> Query
- queryOptsFromOpts :: Day -> ReportOpts -> [QueryOpt]
- transactionDateFn :: ReportOpts -> Transaction -> Day
- postingDateFn :: ReportOpts -> Posting -> Day
- reportStartDate :: Journal -> ReportOpts -> IO (Maybe Day)
- reportEndDate :: Journal -> ReportOpts -> IO (Maybe Day)
- reportStartEndDates :: Journal -> ReportOpts -> IO (Maybe (Day, Day))
- tests_Hledger_Reports_ReportOptions :: Test
Documentation
data ReportOpts #
Standard options for customising report filtering and output, corresponding to hledger's command-line options and query language arguments. Used in hledger-lib and above.
Constructors
ReportOpts | |
Fields
|
Instances
data BalanceType #
Which "balance" is being shown in a balance report.
Constructors
PeriodChange | The change of balance in each period. |
CumulativeChange | The accumulated change across multiple periods. |
HistoricalBalance | The historical ending balance, including the effect of all postings before the report period. Unless altered by, a query, this is what you would see on a bank statement. |
Instances
data AccountListMode #
Should accounts be displayed: in the command's default style, hierarchically, or as a flat list ?
Instances
rawOptsToReportOpts :: RawOpts -> IO ReportOpts #
checkReportOpts :: ReportOpts -> ReportOpts #
Do extra validation of report options, raising an error if there's a problem.
flat_ :: ReportOpts -> Bool #
tree_ :: ReportOpts -> Bool #
Legacy-compatible convenience aliases for accountlistmode_.
whichDateFromOpts :: ReportOpts -> WhichDate #
Report which date we will report on based on --date2.
journalSelectingAmountFromOpts :: ReportOpts -> Journal -> Journal #
Convert this journal's postings' amounts to the cost basis amounts if specified by options.
queryFromOpts :: Day -> ReportOpts -> Query #
Convert report options and arguments to a query.
queryFromOptsOnly :: Day -> ReportOpts -> Query #
Convert report options to a query, ignoring any non-flag command line arguments.
queryOptsFromOpts :: Day -> ReportOpts -> [QueryOpt] #
Convert report options and arguments to query options.
transactionDateFn :: ReportOpts -> Transaction -> Day #
Select the Transaction date accessor based on --date2.
postingDateFn :: ReportOpts -> Posting -> Day #
Select the Posting date accessor based on --date2.
reportStartDate :: Journal -> ReportOpts -> IO (Maybe Day) #
The effective report start date is the one specified by options or queries, otherwise the earliest transaction or posting date in the journal, otherwise (for an empty journal) nothing. Needs IO to parse smart dates in options/queries.
reportEndDate :: Journal -> ReportOpts -> IO (Maybe Day) #
The effective report end date is the one specified by options or queries, otherwise the latest transaction or posting date in the journal, otherwise (for an empty journal) nothing. Needs IO to parse smart dates in options/queries.
reportStartEndDates :: Journal -> ReportOpts -> IO (Maybe (Day, Day)) #