greatly simplifying how states are handled.
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
|
||||
:else
|
||||
nil)]
|
||||
(log/info "csv type was determined to be" csv-type)))
|
||||
(log/info "csv type was determined to be" csv-type)
|
||||
csv-type))
|
||||
|
||||
(defmulti parse-csv
|
||||
determine
|
||||
|
||||
@@ -207,6 +207,7 @@
|
||||
|
||||
(defn import-uploaded-invoice [client forced-location forced-vendor imports]
|
||||
(lc/with-context {:area "upload-invoice"}
|
||||
(log/info "Number of invoices to import is" (count imports) "sample: " (first imports))
|
||||
(let [clients (d-clients/get-all)
|
||||
transactions (reduce (fn [result {:keys [invoice-number customer-identifier account-number total date vendor-code text full-text] :as info}]
|
||||
|
||||
@@ -481,6 +482,7 @@
|
||||
:body (pr-str {})
|
||||
:headers {"Content-Type" "application/edn"}}
|
||||
(catch Exception e
|
||||
(log/warn e)
|
||||
{:status 500
|
||||
:body (pr-str {:message (.getMessage e)
|
||||
:error (.toString e)
|
||||
|
||||
Reference in New Issue
Block a user