weird fix.
This commit is contained in:
@@ -199,6 +199,7 @@
|
|||||||
'[?account-override :vendor-account-override/account ?account-override-account]]}
|
'[?account-override :vendor-account-override/account ?account-override-account]]}
|
||||||
:args [(d/db (d/connect uri)) matching-vendor (:db/id matching-client)]})
|
:args [(d/db (d/connect uri)) matching-vendor (:db/id matching-client)]})
|
||||||
first)
|
first)
|
||||||
|
|
||||||
_ (when-not matching-vendor
|
_ (when-not matching-vendor
|
||||||
(throw (ex-info (str "No vendor with the name " vendor-code " was found.")
|
(throw (ex-info (str "No vendor with the name " vendor-code " was found.")
|
||||||
{:invoice-number invoice-number
|
{:invoice-number invoice-number
|
||||||
@@ -302,10 +303,15 @@
|
|||||||
(context "/invoices" []
|
(context "/invoices" []
|
||||||
(POST "/upload"
|
(POST "/upload"
|
||||||
{{files :file
|
{{files :file
|
||||||
|
files-2 "file"
|
||||||
client :client
|
client :client
|
||||||
location :location} :params :as params}
|
client-2 "client"
|
||||||
(let [{:keys [filename tempfile]} files]
|
location :location
|
||||||
(clojure.pprint/pprint params)
|
location-2 "location"} :params :as params}
|
||||||
|
(let [files (or files files-2)
|
||||||
|
client (or client client-2)
|
||||||
|
location (or location location-2)
|
||||||
|
{:keys [filename tempfile]} files]
|
||||||
#_(println params (.getPath tempfile) filename)
|
#_(println params (.getPath tempfile) filename)
|
||||||
(try
|
(try
|
||||||
(import-uploaded-invoice client location (parse/parse-file (.getPath tempfile) filename))
|
(import-uploaded-invoice client location (parse/parse-file (.getPath tempfile) filename))
|
||||||
|
|||||||
Reference in New Issue
Block a user