Makes reports exportable
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
[auto-ap.datomic
|
||||
:refer [audit-transact-batch conn pull-many remove-nils]]
|
||||
[auto-ap.datomic.accounts :as a]
|
||||
[auto-ap.datomic.clients :as d-clients]
|
||||
[auto-ap.datomic.ledger :as l]
|
||||
[auto-ap.graphql.utils
|
||||
:refer [->graphql
|
||||
@@ -11,15 +10,18 @@
|
||||
assert-admin
|
||||
assert-can-see-client
|
||||
attach-tracing-resolvers
|
||||
extract-client-ids
|
||||
result->page]]
|
||||
[auto-ap.ledger :refer [build-account-lookup]]
|
||||
[auto-ap.ledger.reports :as l-reports]
|
||||
[auto-ap.logging :as alog]
|
||||
[auto-ap.parse.util :as parse]
|
||||
[auto-ap.pdf.ledger
|
||||
:refer [print-balance-sheet
|
||||
print-cash-flows
|
||||
print-journal-detail-report
|
||||
print-pnl]]
|
||||
[auto-ap.solr :as solr]
|
||||
[auto-ap.time :as atime]
|
||||
[auto-ap.utils :refer [by dollars=]]
|
||||
[clj-time.coerce :as coerce]
|
||||
@@ -28,9 +30,7 @@
|
||||
[clojure.tools.logging :as log]
|
||||
[com.brunobonacci.mulog :as mu]
|
||||
[datomic.api :as dc]
|
||||
[iol-ion.tx :refer [random-tempid]]
|
||||
[auto-ap.solr :as solr]
|
||||
[auto-ap.logging :as alog])
|
||||
[iol-ion.tx :refer [random-tempid]])
|
||||
(:import
|
||||
(org.apache.commons.codec.binary Base64)))
|
||||
|
||||
@@ -310,7 +310,9 @@
|
||||
(->graphql result)))
|
||||
|
||||
(defn balance-sheet-pdf [context args value]
|
||||
(let [data (get-balance-sheet context args value)
|
||||
(let [valid-clients (extract-client-ids (:clients context)
|
||||
(:client_ids args))
|
||||
data (get-balance-sheet context args value)
|
||||
result (print-balance-sheet (:id context) args data)]
|
||||
|
||||
(->graphql result)))
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
|
||||
(sequential? x)
|
||||
(map x coerce-client-ids)
|
||||
(mapcat coerce-client-ids x)
|
||||
|
||||
:else
|
||||
[]))
|
||||
|
||||
Reference in New Issue
Block a user