From 09f1432ffb7218676d2426cd5d5ce5f2629cafe7 Mon Sep 17 00:00:00 2001 From: Jonathan Boyle Date: Sun, 3 Sep 2023 13:44:40 +0100 Subject: [PATCH] fix: #202 - missing checks during matching for currency and number --- beancount_import/matching.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beancount_import/matching.py b/beancount_import/matching.py index bf2afa41..ffe91b5f 100644 --- a/beancount_import/matching.py +++ b/beancount_import/matching.py @@ -456,6 +456,10 @@ def _get_matches( if posting_date and posting_date != date: continue + # Verify that number is in fuzzy range + if abs(sp.number - amount.number) > self.fuzzy_match_amount: + continue + key = _entry_and_posting_ids_key(sp.entry, sp.mp) matches[key] = (sp.entry, sp.mp) return matches