diff --git a/hledger-lib/Hledger/Query.hs b/hledger-lib/Hledger/Query.hs index 42b468078..430c97cdb 100644 --- a/hledger-lib/Hledger/Query.hs +++ b/hledger-lib/Hledger/Query.hs @@ -44,6 +44,7 @@ module Hledger.Query ( queryIsReal, queryIsAmt, queryIsSym, + queryIsAmtOrSym, queryIsStartDateOnly, queryIsTransactionRelated, -- * accessors @@ -685,6 +686,9 @@ queryIsSym :: Query -> Bool queryIsSym (Sym _) = True queryIsSym _ = False +queryIsAmtOrSym :: Query -> Bool +queryIsAmtOrSym = liftA2 (||) queryIsAmt queryIsSym + -- | Does this query specify a start date and nothing else (that would -- filter postings prior to the date) ? -- When the flag is true, look for a starting secondary date instead.