fixes
This commit is contained in:
@@ -35,8 +35,14 @@
|
||||
|
||||
(defn get-ledger-page [context args _]
|
||||
(let [args (assoc args :id (:id context))
|
||||
_ (when (:client_id (:filters args))
|
||||
(assert-can-see-client (:id context) (:client_id (:filters args))))
|
||||
clients (or (and (:client_id (:filters args))
|
||||
[{:db/id (:client_id (:filters args))}])
|
||||
(:clients context))
|
||||
|
||||
[journal-entries journal-entries-count] (l/get-graphql (assoc (<-graphql (:filters args))
|
||||
:clients (:clients context)))
|
||||
:clients clients))
|
||||
|
||||
journal-entries (mapv
|
||||
(fn [je]
|
||||
@@ -49,7 +55,7 @@
|
||||
(let [args (assoc args :id (:id context))
|
||||
[journal-entries journal-entries-count] (l/get-graphql (assoc (<-graphql (:filters args))
|
||||
:per-page Integer/MAX_VALUE
|
||||
:id (:id context)))
|
||||
:clients (:clients context)))
|
||||
|
||||
|
||||
]
|
||||
@@ -561,9 +567,9 @@
|
||||
location (:client/locations c)
|
||||
category (:categories input)
|
||||
:let [category (<-graphql category)
|
||||
all-journal-entries (->> (get-ledger-page context
|
||||
{:filters {:client_id client-id
|
||||
:location location
|
||||
all-journal-entries (->> (get-ledger-page (assoc context
|
||||
:clients [{:db/id client-id}])
|
||||
{:filters {:location location
|
||||
:date_range (:date_range input)
|
||||
:from_numeric_code (l-reports/min-numeric-code category )
|
||||
:to_numeric_code (l-reports/max-numeric-code category )
|
||||
|
||||
Reference in New Issue
Block a user