hledger-0.6.1: A command-line (or curses or web-based) double-entry accounting tool.Source codeContentsIndex
Ledger.Types
Description

Most data types are defined here to avoid import cycles. See the corresponding modules for each type's documentation.

A note about entry/transaction/posting terminology:

  • ledger 2 had Entrys containing Transactions.
  • hledger 0.4 had Entrys containing RawTransactions, plus Transactions which were a RawTransaction with its parent Entry's info added. The latter are what we most work with when reporting and are ubiquitous in the code and docs.
  • ledger 3 has Transactions containing Postings.
  • hledger 0.5 has LedgerTransactions containing Postings, plus Transactions as before (a Posting plus it's parent's info). The "transaction" term is pretty ingrained in the code, docs and with users, so we've kept it.
Documentation
type SmartDate = (String, String, String)Source
data DateSpan Source
Constructors
DateSpan (Maybe Day) (Maybe Day)
show/hide Instances
data Interval Source
Constructors
NoInterval
Daily
Weekly
Monthly
Quarterly
Yearly
show/hide Instances
type AccountName = StringSource
data Side Source
Constructors
L
R
show/hide Instances
data Commodity Source
Constructors
Commodity
symbol :: Stringthe commodity's symbol display preferences for amounts of this commodity
side :: Sideshould the symbol appear on the left or the right
spaced :: Boolshould there be a space between symbol and quantity
comma :: Boolshould thousands be comma-separated
precision :: Intnumber of decimal places to display
show/hide Instances
data Amount Source
Constructors
Amount
commodity :: Commodity
quantity :: Double
price :: Maybe MixedAmountoptional per-unit price for this amount at the time of entry
show/hide Instances
newtype MixedAmount Source
Constructors
Mixed [Amount]
show/hide Instances
data PostingType Source
Constructors
RegularPosting
VirtualPosting
BalancedVirtualPosting
show/hide Instances
data Posting Source
Constructors
Posting
pstatus :: Bool
paccount :: AccountName
pamount :: MixedAmount
pcomment :: String
ptype :: PostingType
show/hide Instances
data ModifierTransaction Source
Constructors
ModifierTransaction
mtvalueexpr :: String
mtpostings :: [Posting]
show/hide Instances
data PeriodicTransaction Source
Constructors
PeriodicTransaction
ptperiodicexpr :: String
ptpostings :: [Posting]
show/hide Instances
data LedgerTransaction Source
Constructors
LedgerTransaction
ltdate :: Day
ltstatus :: Bool
ltcode :: String
ltdescription :: String
ltcomment :: String
ltpostings :: [Posting]
ltpreceding_comment_lines :: String
show/hide Instances
data TimeLogCode Source
Constructors
SetBalance
SetRequiredHours
In
Out
FinalOut
show/hide Instances
data TimeLogEntry Source
Constructors
TimeLogEntry
tlcode :: TimeLogCode
tldatetime :: LocalTime
tlcomment :: String
show/hide Instances
data HistoricalPrice Source
Constructors
HistoricalPrice
hdate :: Day
hsymbol1 :: String
hsymbol2 :: String
hprice :: Double
show/hide Instances
data RawLedger Source
Constructors
RawLedger
modifier_txns :: [ModifierTransaction]
periodic_txns :: [PeriodicTransaction]
ledger_txns :: [LedgerTransaction]
open_timelog_entries :: [TimeLogEntry]
historical_prices :: [HistoricalPrice]
final_comment_lines :: String
filepath :: FilePath
show/hide Instances
data Transaction Source
Constructors
Transaction
tnum :: Int
tstatus :: Boolposting status
tdate :: Dayledger transaction date
tdescription :: Stringledger transaction description
taccount :: AccountNameposting account
tamount :: MixedAmountposting amount
ttype :: PostingTypeposting type
show/hide Instances
data Account Source
Constructors
Account
aname :: AccountName
atransactions :: [Transaction]transactions in this account
abalance :: MixedAmountsum of transactions in this account and subaccounts
show/hide Instances
data Ledger Source
Constructors
Ledger
rawledgertext :: String
rawledger :: RawLedger
accountnametree :: Tree AccountName
accountmap :: Map AccountName Account
show/hide Instances
Produced by Haddock version 2.6.0