This commit is contained in:
Bryce Covert
2019-12-21 14:57:48 -08:00
14 changed files with 332 additions and 50 deletions

View File

@@ -166,7 +166,6 @@
(defn import-uploaded-invoice [imports]
(let [clients (d-clients/get-all)
_ (clojure.pprint/pprint imports)
transactions (reduce (fn [result {:keys [invoice-number customer-identifier total date vendor-code text full-text] :as info}]
(println "searching for" vendor-code)
@@ -204,6 +203,7 @@
:else
(conj result (remove-nils #:invoice {:invoice/client (:db/id matching-client)
:invoice/client-identifier customer-identifier
:invoice/vendor matching-vendor
:invoice/invoice-number invoice-number
:invoice/total (Double/parseDouble total)
@@ -219,8 +219,7 @@
))
[]
imports)]
@(d/transact (d/connect uri) transactions)))
@(d/transact (d/connect uri) (vec (set transactions)))))
(defroutes routes
(wrap-routes