diff --git a/src/clj/auto_ap/import/plaid.clj b/src/clj/auto_ap/import/plaid.clj index 76756015..c07ec23a 100644 --- a/src/clj/auto_ap/import/plaid.clj +++ b/src/clj/auto_ap/import/plaid.clj @@ -29,6 +29,7 @@ (defn plaid->transaction [t plaid-merchant->vendor-id] + (alog/info ::trying-transaction :transaction t) (cond-> #:transaction {:description-original (:name t) :raw-id (:transaction_id t) :db/id (random-tempid) @@ -37,7 +38,7 @@ :amount (if (= "credit" (:type (:account t))) (- (double (:amount t))) (double (:amount t))) - :date (coerce/to-date (atime/parse (:authorized_date t) atime/iso-date)) + :date (coerce/to-date (atime/parse (or (:authorized_date t) (:date t)) atime/iso-date)) :status "POSTED"} (:merchant_name t) (assoc :transaction/plaid-merchant {:plaid-merchant/name (:merchant_name t) :db/id (random-tempid)})