Makes a nice and fast report.

This commit is contained in:
Bryce
2023-08-21 21:42:44 -07:00
parent d0d654511d
commit 871e5a9bfb
2 changed files with 9 additions and 4 deletions

View File

@@ -463,7 +463,11 @@
(into (list) (apply dc/q (read-string (get query-params "query" )) (into [(dc/db conn)] (read-string (get query-params "args" "[]")))))}))
(defn export-ntg-account-snapshot [_]
(let [clients (pull-many (dc/db conn) '[:db/id :client/code :client/locations] [[:client/code "NGAK"] [:client/code "NGOP"] [:client/code "NGRV"] [:client/code "NGE1"]])
(let [clients (->> (dc/q '[:find (pull ?e [:db/id :client/code :client/locations])
:in $
:where [?e :client/feature-flags "include-in-ntg-corp-reports"]]
(dc/db conn))
(map first))
account->numeric-code (into {} (seq (dc/q '[:find ?i ?n
:in $ [?a ...]
:where [?i ?a ?n]]