In the event of a check number, do not rough match.
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user