From 15674bf5be2c6b654bedea7dadb3358d21af6bc3 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 7 Jun 2024 20:04:47 -0700 Subject: [PATCH] In the event of a check number, do not rough match. --- src/clj/auto_ap/import/transactions.clj | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/clj/auto_ap/import/transactions.clj b/src/clj/auto_ap/import/transactions.clj index 0bf9f2d4..17e20b75 100644 --- a/src/clj/auto_ap/import/transactions.clj +++ b/src/clj/auto_ap/import/transactions.clj @@ -39,19 +39,18 @@ nil (:transaction/payment (d-transactions/get-by-id [:transaction/id #_{:clj-kondo/ignore [:unresolved-var]} - (di/sha-256 (str id))])) + (di/sha-256 (str id))])) nil check-number - (or (-> (d-checks/get-graphql {:client-id client-id - :clients [client-id] - :bank-account-id bank-account-id - :check-number check-number - :amount (- amount) - :status :payment-status/pending}) - first - first) - (rough-match client-id bank-account-id amount)) + (-> (d-checks/get-graphql {:client-id client-id + :clients [client-id] + :bank-account-id bank-account-id + :check-number check-number + :amount (- amount) + :status :payment-status/pending}) + first + first) :else (rough-match client-id bank-account-id amount)))