hledger-iadd-1.3.13: A terminal UI as drop-in replacement for hledger add
Safe HaskellNone
LanguageHaskell2010

Model

Synopsis

Documentation

data Step Source #

Instances

Instances details
Eq Step Source # 
Instance details

Defined in Model

Methods

(==) :: Step -> Step -> Bool #

(/=) :: Step -> Step -> Bool #

Show Step Source # 
Instance details

Defined in Model

Methods

showsPrec :: Int -> Step -> ShowS #

show :: Step -> String #

showList :: [Step] -> ShowS #

data MaybeStep Source #

Constructors

Finished Transaction 
Step Step 

Instances

Instances details
Eq MaybeStep Source # 
Instance details

Defined in Model

Show MaybeStep Source # 
Instance details

Defined in Model

data MatchAlgo Source #

Constructors

Fuzzy 
Substrings 

Instances

Instances details
Eq MatchAlgo Source # 
Instance details

Defined in Model

Show MatchAlgo Source # 
Instance details

Defined in Model

undo :: Step -> Either Text Step Source #

Reverses the last step.

Returns (Left errorMessage), if the step can't be reversed

suggest :: Journal -> DateFormat -> Step -> IO (Maybe Text) Source #

Suggest the initial text of the entry box for each step

For example, it suggests today for the date prompt

Helpers exported for easier testing

accountsByFrequency :: Journal -> [AccountName] Source #

All accounts occuring in the journal sorted in descending order of appearance.

isDuplicateTransaction :: Journal -> Transaction -> Bool Source #

Deterimine if a given transaction already occurs in the journal

This function ignores certain attributes of transactions, postings and amounts that are either artifacts of knot-tying or are purely for presentation.

See the various ...attributes functions in the where clause for details.