fixes
This commit is contained in:
@@ -177,7 +177,6 @@
|
||||
payments))
|
||||
|
||||
(defn get-graphql [args]
|
||||
(log/info (:id args))
|
||||
(let [db (dc/db conn)
|
||||
{ids-to-retrieve :ids matching-count :count} (raw-graphql-ids db args)]
|
||||
|
||||
|
||||
@@ -165,15 +165,7 @@
|
||||
|
||||
:else
|
||||
nil)
|
||||
matching-ids (cond
|
||||
(and name-like-ids (limited-clients (:id args)))
|
||||
(set/intersection name-like-ids (limited-clients (:id args)))
|
||||
|
||||
name-like-ids
|
||||
name-like-ids
|
||||
|
||||
:else
|
||||
nil)
|
||||
matching-ids name-like-ids
|
||||
valid-ids (if matching-ids
|
||||
(set/intersection (set (map :db/id (:clients args)))
|
||||
matching-ids)
|
||||
|
||||
@@ -60,10 +60,7 @@
|
||||
:where ['[?e :invoice/client]]}
|
||||
:args [db]}
|
||||
|
||||
(seq (:clients args))
|
||||
(merge-query {:query {:in ['[?xx ...]]
|
||||
:where ['[?e :invoice/client ?xx]]}
|
||||
:args [ (map :db/id (:clients args))]})
|
||||
|
||||
(:client-id args)
|
||||
(merge-query {:query {:in ['?client-id]
|
||||
:where ['[?e :invoice/client ?client-id]]}
|
||||
@@ -102,6 +99,10 @@
|
||||
:where ['[?e :invoice/due ?due]
|
||||
'[(<= ?due ?end-due)]]}
|
||||
:args [(coerce/to-date (:end (:due-range args)))]})
|
||||
(seq (:clients args))
|
||||
(merge-query {:query {:in ['[?xx ...]]
|
||||
:where ['[?e :invoice/client ?xx]]}
|
||||
:args [ (map :db/id (:clients args))]})
|
||||
|
||||
(:import-status args)
|
||||
(merge-query {:query {:in ['?import-status]
|
||||
|
||||
@@ -119,10 +119,6 @@
|
||||
:where ['[?li :journal-entry-line/location ?location]]}
|
||||
:args [(:locations args)]})
|
||||
|
||||
(limited-clients (:id args))
|
||||
(merge-query {:query {:in ['[?xx ...]]
|
||||
:where ['[?e :journal-entry/client ?xx]]}
|
||||
:args [(set (map :db/id (limited-clients (:id args))))]})
|
||||
(:sort args) (add-sorter-fields {"client" ['[?e :journal-entry/client ?c]
|
||||
'[?c :client/name ?sort-client]]
|
||||
"date" ['[?e :journal-entry/date ?sort-date]]
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
:where ['[?e :report/client ?xx]]}
|
||||
:args [(set (map :db/id (:clients args)))]})
|
||||
|
||||
(limited-clients (:id args))
|
||||
(merge-query {:query {:in ['[?xx ...]]
|
||||
:where ['[?e :report/client ?xx]]}
|
||||
:args [(set (map :db/id (limited-clients (:id args))))]})
|
||||
(:sort args) (add-sorter-fields {"client" ['[?e :report/client ?c]
|
||||
'[?c :client/name ?sort-client]]
|
||||
"created" ['[?e :report/created ?sort-created]]
|
||||
|
||||
Reference in New Issue
Block a user