diff --git a/src/clj/auto_ap/db/invoices.clj b/src/clj/auto_ap/db/invoices.clj index 35fcf95c..53062c44 100644 --- a/src/clj/auto_ap/db/invoices.clj +++ b/src/clj/auto_ap/db/invoices.clj @@ -30,7 +30,7 @@ (map clj->db ) (map (apply juxt k))))]] :insert-into [[:invoices k] - {:select [:v.company-id :v.vendor-id :v.invoice-number :v.total (sql/raw "cast(v.date as timestamp)") :v.imported :v.status :v.outstanding-balance :v.default-location :v.default-expense-account] + {:select [:v.company-id :v.vendor-id :v.invoice-number :v.total (sql/raw "cast(v.date as timestamp)") :v.imported :v.status :v.outstanding-balance :v.default-location (sql/raw "cast(v.default_expense_account as INT)")] :from [:v] :left-join [[:invoices :exist] [:and