account rollout bug fixes.
This commit is contained in:
@@ -262,7 +262,8 @@
|
|||||||
(POST "/batch-upload"
|
(POST "/batch-upload"
|
||||||
{{:keys [data]} :edn-params user :identity}
|
{{:keys [data]} :edn-params user :identity}
|
||||||
(assert-admin user)
|
(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-clients (d-clients/get-all)
|
||||||
all-bank-accounts (mapcat :client/bank-accounts all-clients)
|
all-bank-accounts (mapcat :client/bank-accounts all-clients)
|
||||||
all-clients (merge (by :client/code all-clients) (by :client/name all-clients))
|
all-clients (merge (by :client/code all-clients) (by :client/name all-clients))
|
||||||
@@ -290,7 +291,15 @@
|
|||||||
{:status 200
|
{:status 200
|
||||||
:body (pr-str {:imported (count raw-transactions)
|
:body (pr-str {:imported (count raw-transactions)
|
||||||
:errors (map #(dissoc % :date) error-rows)})
|
: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" []
|
(context "/invoices" []
|
||||||
(POST "/upload"
|
(POST "/upload"
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
:location (when check
|
:location (when check
|
||||||
"A")
|
"A")
|
||||||
:accounts (when check
|
: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"
|
:location "A"
|
||||||
:amount (Math/abs (double amount))}])}
|
:amount (Math/abs (double amount))}])}
|
||||||
|
|
||||||
|
|||||||
@@ -615,7 +615,7 @@
|
|||||||
current-client @(re-frame/subscribe [::subs/client])]
|
current-client @(re-frame/subscribe [::subs/client])]
|
||||||
[:div
|
[:div
|
||||||
#_[:h1.title (str (str/capitalize (or status "all")) " invoices")]
|
#_[:h1.title (str (str/capitalize (or status "all")) " invoices")]
|
||||||
(when (= status "unpaid")
|
(when (= status :unpaid)
|
||||||
[pay-button {:print-checks-shown? print-checks-shown? :checked-invoices checked :print-checks-loading? print-checks-loading?}])
|
[pay-button {:print-checks-shown? print-checks-shown? :checked-invoices checked :print-checks-loading? print-checks-loading?}])
|
||||||
[table/invoice-table {:id :unpaid
|
[table/invoice-table {:id :unpaid
|
||||||
:invoice-page (re-frame/subscribe [::invoice-page])
|
:invoice-page (re-frame/subscribe [::invoice-page])
|
||||||
@@ -626,7 +626,7 @@
|
|||||||
(re-frame/dispatch [::unvoid-invoice which]))
|
(re-frame/dispatch [::unvoid-invoice which]))
|
||||||
:on-void-invoice (fn [which]
|
:on-void-invoice (fn [which]
|
||||||
(re-frame/dispatch [::void-invoice which]))
|
(re-frame/dispatch [::void-invoice which]))
|
||||||
:check-boxes (= status "unpaid")
|
:check-boxes (= status :unpaid)
|
||||||
:checked checked
|
:checked checked
|
||||||
:on-check-changed (fn [which invoice]
|
:on-check-changed (fn [which invoice]
|
||||||
(re-frame/dispatch [::toggle-check which invoice]))
|
(re-frame/dispatch [::toggle-check which invoice]))
|
||||||
|
|||||||
Reference in New Issue
Block a user