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))}])}
|
||||
|
||||
|
||||
@@ -615,7 +615,7 @@
|
||||
current-client @(re-frame/subscribe [::subs/client])]
|
||||
[:div
|
||||
#_[: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?}])
|
||||
[table/invoice-table {:id :unpaid
|
||||
:invoice-page (re-frame/subscribe [::invoice-page])
|
||||
@@ -626,7 +626,7 @@
|
||||
(re-frame/dispatch [::unvoid-invoice which]))
|
||||
:on-void-invoice (fn [which]
|
||||
(re-frame/dispatch [::void-invoice which]))
|
||||
:check-boxes (= status "unpaid")
|
||||
:check-boxes (= status :unpaid)
|
||||
:checked checked
|
||||
:on-check-changed (fn [which invoice]
|
||||
(re-frame/dispatch [::toggle-check which invoice]))
|
||||
|
||||
Reference in New Issue
Block a user