penny-lib- Extensible double-entry accounting system - library

Safe HaskellNone



Examining a Posting for a particular component of the main posting (as opposed to the sibling postings) in the Posting. For some components, such as the payee, the posting might have one piece of data while the TopLine has something else. These functions will examine the Posting first and, if it has no information, use the data from the TopLine if it is there.



best :: (TopLineData -> Maybe a) -> (Ents PostingData -> Maybe a) -> Posting -> Maybe aSource

Uses the data from the Posting if it is set; otherwise, use the data from the TopLine.