mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
lib: When matching an account query against a posting, don't try to
match against the same posting twice, in cases when poriginal is Nothing.
This commit is contained in:
parent
7abf8eedd5
commit
6c2ab5c940
@ -608,7 +608,7 @@ matchesPosting (Or qs) p = any (`matchesPosting` p) qs
|
||||
matchesPosting (And qs) p = all (`matchesPosting` p) qs
|
||||
matchesPosting (Code r) p = maybe False (regexMatchText r . tcode) $ ptransaction p
|
||||
matchesPosting (Desc r) p = maybe False (regexMatchText r . tdescription) $ ptransaction p
|
||||
matchesPosting (Acct r) p = matches p || matches (originalPosting p)
|
||||
matchesPosting (Acct r) p = matches p || maybe False matches (poriginal p)
|
||||
where matches = regexMatchText r . paccount
|
||||
matchesPosting (Date span) p = span `spanContainsDate` postingDate p
|
||||
matchesPosting (Date2 span) p = span `spanContainsDate` postingDate2 p
|
||||
|
Loading…
Reference in New Issue
Block a user