From 826dd6709edf8b9d38b337c9197c65b267bfa2f1 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 26 Jan 2021 16:25:07 -0800 Subject: [PATCH] Made matching reset accounts --- src/clj/auto_ap/yodlee/import.clj | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/clj/auto_ap/yodlee/import.clj b/src/clj/auto_ap/yodlee/import.clj index c7843b4e..7a366f3d 100644 --- a/src/clj/auto_ap/yodlee/import.clj +++ b/src/clj/auto_ap/yodlee/import.clj @@ -139,11 +139,12 @@ :transaction/payment payment-id :transaction/approval-status :transaction-approval-status/approved :transaction/vendor vendor - :transaction/location "A" - :transaction/accounts [#:transaction-account - {:account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"])) - :location "A" - :amount (Math/abs (:transaction/amount transaction))}])))) + :transaction/location "A") + (conj [:reset (:db/id transaction) :transaction/accounts + [#:transaction-account + {:account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"])) + :location "A" + :amount (Math/abs (:transaction/amount transaction))}]])))) (defn extract-check-number [{{description-original :original} :description}]