account rollout bug fixes.
This commit is contained in:
@@ -262,7 +262,8 @@
|
||||
(POST "/batch-upload"
|
||||
{{:keys [data]} :edn-params user :identity}
|
||||
(assert-admin user)
|
||||
(let [columns [:status :raw-date :description-original :high-level-category nil nil :amount nil nil nil nil nil :bank-account-code :client-code]
|
||||
(try
|
||||
(let [columns [:status :raw-date :description-original :high-level-category nil nil :amount nil nil nil nil nil :bank-account-code :client-code]
|
||||
all-clients (d-clients/get-all)
|
||||
all-bank-accounts (mapcat :client/bank-accounts all-clients)
|
||||
all-clients (merge (by :client/code all-clients) (by :client/name all-clients))
|
||||
@@ -290,7 +291,15 @@
|
||||
{:status 200
|
||||
:body (pr-str {:imported (count raw-transactions)
|
||||
:errors (map #(dissoc % :date) error-rows)})
|
||||
:headers {"Content-Type" "application/edn"}})))
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
(catch Exception e
|
||||
(println (.toString e))
|
||||
{:status 500
|
||||
:body (pr-str {:message (.getMessage e)
|
||||
:error (.toString e)
|
||||
:data (ex-data e)})
|
||||
:headers {"Content-Type" "application/edn"}}))
|
||||
))
|
||||
|
||||
(context "/invoices" []
|
||||
(POST "/upload"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
:location (when check
|
||||
"A")
|
||||
:accounts (when check
|
||||
[#:transaction-account {:account (:db/id (a/get-account-by-numeric-code-and-sets 2110 ["default"]))
|
||||
[#:transaction-account {:account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"]))
|
||||
:location "A"
|
||||
:amount (Math/abs (double amount))}])}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user