bank accounts can now have locations.
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
[auto-ap.datomic.clients :as d-clients]
|
||||
[auto-ap.time :as time]
|
||||
[auto-ap.datomic.transaction-rules :as tr]
|
||||
[auto-ap.rule-matching :as rm]))
|
||||
[auto-ap.rule-matching :as rm]
|
||||
[clojure.string :as str]))
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +78,7 @@
|
||||
bank-account-id (:db/id bank-account)
|
||||
client (:client/_bank-accounts bank-account)
|
||||
client-id (:db/id client)
|
||||
valid-locations (:client/locations client)
|
||||
valid-locations (or (:bank-account/locations bank-account) (:client/locations client))
|
||||
check (transaction->payment transaction check-number client-id bank-account-id amount id)]
|
||||
:when (and client-id
|
||||
(not (existing (sha-256 (str id)))))]
|
||||
@@ -87,7 +88,8 @@
|
||||
:id (sha-256 (str id))
|
||||
:account-id account-id
|
||||
:date (coerce/to-date (time/parse date "YYYY-MM-dd"))
|
||||
:yodlee-merchant (when (and merchant-id merchant-name)
|
||||
:yodlee-merchant (when (and merchant-id merchant-name (not (str/blank? merchant-id)))
|
||||
|
||||
{:yodlee-merchant/yodlee-id merchant-id
|
||||
:yodlee-merchant/name merchant-name})
|
||||
:amount (double amount)
|
||||
|
||||
Reference in New Issue
Block a user