makes import check for accoutns

This commit is contained in:
Bryce Covert
2019-08-31 07:08:57 -07:00
parent c88840c719
commit 96ec3b1cf5
2 changed files with 16 additions and 13 deletions

View File

@@ -167,8 +167,8 @@
{}
(:entries args))
all-vendors (into all-vendors new-hidden-vendors)
all-accounts (transduce (map :account/code) conj #{} (a/get-accounts))
transaction (doall (map
(assoc-error (fn [entry]
(let [entry (-> entry
(update :amount #(Double/parseDouble %))
@@ -207,7 +207,7 @@
(:location ea))
(throw (Exception. (str "Location '" (:location ea) "' not found."))))
(when (and (not (re-matches #"^[0-9]+$" (:account_identifier ea)))
(when (and (not (all-accounts (:account_identifier ea)))
(not (get
(get all-client-bank-accounts (:client_code entry))
(:account_identifier ea))))