penny- Extensible double-entry accounting system

Safe HaskellNone




data VisibleNum Source

Each row that is visible on screen is assigned a VisibleNum. This is used to number the rows in the report for the user's benefit. It is also used to determine whether the row is even or odd for the purpose of assigning the background color (this way the background colors can alternate, like a checkbook register.)

data PostMeta Source




:: ShowZeroBalances 
-> Pdct (LibertyMeta, Posting)

Removes posts from the report if applying this function to the post returns a value other than Just True. Posts removed still affect the running balance.

-> [PostFilterFn]

Applies these post-filters to the list of posts that results from applying the predicate above. Might remove more postings. Postings removed still affect the running balance.

-> [(LibertyMeta, Posting)] 
-> [(PostMeta, Posting)] 

Adds appropriate metadata, including the running balance, to a list of Box. Because all posts are incorporated into the running balance, first calculates the running balance for all posts. Then, removes posts we're not interested in by applying the predicate and the post-filter. Finally, adds on the metadata, which will include the VisibleNum.