Makes running datomic cloud work again

This commit is contained in:
2023-03-17 12:56:39 -07:00
parent aebf95a87b
commit f7fe2b2bee
12 changed files with 102 additions and 105 deletions

View File

@@ -231,7 +231,7 @@
(println args)
(let [data (<-graphql data)
args (<-graphql args)
clients (d/pull-many (d/db conn) '[:client/code :client/name :db/id] (:client-ids args))
clients (pull-many (dc/db conn) '[:client/code :client/name :db/id] (:client-ids args))
report (l-reports/journal-detail-report args data (by :db/id :client/code clients))
output-stream (ByteArrayOutputStream.)]
(log/info report)
@@ -266,7 +266,7 @@
max-date (atime/unparse-local
(->> args :date_range :end)
atime/iso-date)
names (str/replace (->> args :client_ids (d/pull-many (d/db conn) [:client/name]) (map :client/name) (str/join "-")) #" " "_" )]
names (str/replace (->> args :client_ids (pull-many (dc/db conn) [:client/name]) (map :client/name) (str/join "-")) #" " "_" )]
(format "Profit-and-loss-%s-to-%s-for-%s" min-date max-date names)))
(defn balance-sheet-args->name [args]
@@ -330,12 +330,13 @@
:input-stream (io/make-input-stream pdf-data {})
:metadata {:content-length (count pdf-data)
:content-type "application/pdf"})
@(d/transact conn
[{:report/name name
:report/client (:client_ids args)
:report/key key
:report/url url
:report/creator (:user user)
:report/created (java.util.Date.)}])
(dc/transact conn
{:tx-data
[{:report/name name
:report/client (:client_ids args)
:report/key key
:report/url url
:report/creator (:user user)
:report/created (java.util.Date.)}]})
{:report/name name
:report/url url }))