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

Safe HaskellNone

Penny.Lincoln.Predicates

Description

Functions that return a boolean based upon some criterion that matches something, often a PostFam. Useful when filtering Postings.

Synopsis

Documentation

data Comp Source

Comparisons.

Constructors

DLT

Less than

DLTEQ

Less than or equal to

DEQ

Equal to

DGTEQ

Greater than or equal to

DGT

Greater than

DNE

Not equal to

Instances

descComp :: Ord a => Comp -> (Text, a -> a -> Bool)Source

Describes a Comp, and returns a function to actually perform comparisons.

reconciled :: LPdctSource

True if a posting is reconciled; that is, its flag is exactly R.

clonedTransactions :: Transaction -> Transaction -> BoolSource

Returns True if these two transactions are clones; that is, if they are identical in all respects except some aspects of their metadata. The metadata that is disregarded when testing for clones pertains to the location of the transaction. (Resembles cloned sheep, which are identical but cannot be in exactly the same place.)

clonedTopLines :: TopLine -> TopLine -> BoolSource

Returns True if two TopLines are clones. Considers only the non-metadata aspects of the TopLine; the metadata all pertains only to the location of the TopLine. The DateTimes are compared based on both the local time and the time zone; that is, two times that refer to the same instant will not compare as identical if they have different time zones.

clonedPostings :: Posting -> Posting -> BoolSource

Returns True if two Postings are clones. Considers only the non-location-related aspects of the posting metadata.