Quality of life improvements with client login
This commit is contained in:
@@ -39,8 +39,6 @@
|
||||
(if-let [id (:db/id (or (clients client-code)
|
||||
(clients client)))]
|
||||
(do
|
||||
(println "FOUND CLIENT" (or (clients client-code)
|
||||
(clients client)))
|
||||
(when (not ((set (:client/locations (or (clients client-code)
|
||||
(clients client))))
|
||||
default-location))
|
||||
@@ -78,8 +76,8 @@
|
||||
(defn parse-account-numeric-code [i]
|
||||
(try
|
||||
(when-let [account-numeric-code (:account-numeric-code i)]
|
||||
(d-accounts/get-account-by-numeric-code-and-sets (Integer/parseInt account-numeric-code)
|
||||
["default"]))
|
||||
(:db/id (d-accounts/get-account-by-numeric-code-and-sets (Integer/parseInt account-numeric-code)
|
||||
["default"])))
|
||||
(catch Exception e
|
||||
(throw (Exception. (str "Could not parse expense account from value '" (:account-numeric-code i) "'") e)))))
|
||||
|
||||
@@ -481,12 +479,7 @@
|
||||
{{:keys [excel-rows]} :edn-params user :identity}
|
||||
(assert-admin user)
|
||||
(let [parsed-invoice-rows (parse-invoice-rows excel-rows)
|
||||
existing-rows (->> (d-invoices/get-graphql {:count Integer/MAX_VALUE})
|
||||
first
|
||||
(filter (fn [i] (not= :invoice-status/voided (:invoice/status i))))
|
||||
(map (fn [{:keys [:invoice/vendor :invoice/client :invoice/invoice-number]}]
|
||||
[(:db/id vendor) (:db/id client) invoice-number]))
|
||||
set)
|
||||
existing-rows (set (d-invoices/get-existing-set ))
|
||||
grouped-rows (group-by
|
||||
(fn [i]
|
||||
(cond (seq (:errors i))
|
||||
|
||||
Reference in New Issue
Block a user