Safe Haskell | Safe-Infered |
---|
The Penny Postings report
The Postings report displays postings in a tabular format designed to be read by humans. Some terminology used in the Postings report:
row
- The smallest unit that spans from left to right. A row, however, might consist of more than one screen line. For example, the running balance is shown on the far right side of the Postings report. The running balance might consist of more than one commodity. Each commodity is displayed on its own screen line. However, all these lines put together are displayed in a single row.
column
- The smallest unit that spans from top to bottom.
tranche
- Each posting is displayed in several rows. The group of rows that is displayed for a single posting is called a tranche.
tranche row
- Each tranche has a particular number of rows (currently four); each of these rows is known as a tranche row.
field
- Corresponds to a particular element of the posting, such as whether it is a debit or credit or its payee. The user can select which fields to see.
allocation
- The width of the Payee and Account fields is variable. Generally their width will adjust to fill the entire width of the screen. The allocations of the Payee and Account fields determine how much of the remaining space each field will receive.
The Postings report is easily customized from the command line to show various fields. However, the order of the fields is not configurable without editing the source code (sorry).
- defaultPostsReport :: DefaultTimeZone -> RadGroup -> Report
- customPostsReport :: (Runtime -> T) -> Report
- data T = T {
- drCrColors :: DrCrColors
- baseColors :: BaseColors
- dateFormat :: Box -> Text
- qtyFormat :: Box -> Text
- balanceFormat :: Commodity -> BottomLine -> Text
- payeeAllocation :: Allocation
- accountAllocation :: Allocation
- width :: ReportWidth
- subAccountLength :: Int
- colorPref :: Colors
- timeZone :: DefaultTimeZone
- radGroup :: RadGroup
- sensitive :: CaseSensitive
- factory :: CaseSensitive -> Text -> Exceptional Text (Text -> Bool)
- tokens :: [Token (Box LibertyMeta -> Bool)]
- postFilter :: [PostFilterFn]
- fields :: T Bool
- spacers :: T Int
- showZeroBalances :: ShowZeroBalances
- newtype ReportWidth = ReportWidth {
- unReportWidth :: Int
- ymd :: Box -> Text
- qtyAsIs :: Box -> Text
- balanceAsIs :: Commodity -> BottomLine -> Text
- defaultWidth :: ReportWidth
- columnsVarToWidth :: Maybe String -> ReportWidth
- defaultOptions :: DefaultTimeZone -> RadGroup -> Runtime -> T
- widthFromRuntime :: Runtime -> ReportWidth
- defaultFields :: T Bool
Defaults
defaultPostsReport :: DefaultTimeZone -> RadGroup -> ReportSource
When applied to a DefaultTimeZone and a RadGroup, returns a report with the default options.
Custom report
:: (Runtime -> T) | Function that, when applied to a Runtime, returns the default options for the posts report. The options will be overridden by any options on the command line. |
-> Report |
Generate a custom Posts report.
Options
T | |
|
newtype ReportWidth Source
balanceAsIs :: Commodity -> BottomLine -> TextSource
defaultOptions :: DefaultTimeZone -> RadGroup -> Runtime -> TSource