ignoring vendor on transactions.
This commit is contained in:
@@ -8,12 +8,8 @@
|
||||
[auto-ap.time :as time]))
|
||||
|
||||
|
||||
(defn transaction->vendor-id [_]
|
||||
(-> (vendors/get-all)
|
||||
first
|
||||
:id))
|
||||
|
||||
(defn transaction->check-id [_ check-number company-id vendor-id]
|
||||
(defn transaction->check-id [_ check-number company-id]
|
||||
(when check-number
|
||||
(-> (checks/get-graphql {:company-id company-id
|
||||
:check-number check-number})
|
||||
@@ -57,8 +53,7 @@
|
||||
(assoc-in transaction [:description :original] (str "check xxx" (rand-nth ["6789" "1234" "6790"])))
|
||||
transaction)
|
||||
check-number (extract-check-number transaction)
|
||||
company-id (account->company account-id)
|
||||
vendor-id (transaction->vendor-id transaction)]]
|
||||
company-id (account->company account-id) ]]
|
||||
|
||||
(try
|
||||
(transactions/upsert!
|
||||
@@ -72,10 +67,9 @@
|
||||
:type type
|
||||
:status status
|
||||
:company-id company-id
|
||||
:vendor-id vendor-id
|
||||
:check-number check-number
|
||||
:bank-account-id (yodlee-account-id->bank-account-id account-id)
|
||||
:check-id (transaction->check-id transaction check-number company-id vendor-id)
|
||||
:check-id (transaction->check-id transaction check-number company-id)
|
||||
})
|
||||
(catch Exception e
|
||||
(println e))))))
|
||||
|
||||
Reference in New Issue
Block a user