From 89b31e521eb3e5c68bc4408e149b81fa627351ec Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 23 Apr 2019 22:36:13 -0700 Subject: [PATCH] can now match debits. --- src/clj/auto_ap/graphql/checks.clj | 2 +- src/clj/auto_ap/yodlee/import.clj | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/clj/auto_ap/graphql/checks.clj b/src/clj/auto_ap/graphql/checks.clj index 9c9ace0f..9e5c0e79 100644 --- a/src/clj/auto_ap/graphql/checks.clj +++ b/src/clj/auto_ap/graphql/checks.clj @@ -269,7 +269,7 @@ (map (fn [i] (str (:invoice/invoice-number i) "(" (invoice-amounts (:db/id i)) ")")) invoices))) - :payment/status :payment-status/cleared)] + :payment/status :payment-status/pending)] (-> [] (conj payment) (into (invoice-payments invoices invoice-amounts))))) diff --git a/src/clj/auto_ap/yodlee/import.clj b/src/clj/auto_ap/yodlee/import.clj index 711dd3f9..25dd2051 100644 --- a/src/clj/auto_ap/yodlee/import.clj +++ b/src/clj/auto_ap/yodlee/import.clj @@ -93,8 +93,10 @@ (:db/id (:payment/vendor check))) :location (when check "A") - :account (when check - (:db/id (a/get-account-by-numeric-code-and-sets 2110 ["default"]))) + :accounts (when check + [#:transaction-account {:account (:db/id (a/get-account-by-numeric-code-and-sets 2110 ["default"])) + :location "A" + :amount (Math/abs (double amount))}]) })]