bugfix.
This commit is contained in:
@@ -253,6 +253,17 @@
|
|||||||
specific-ids (d-invoices/filter-ids (:ids args))]
|
specific-ids (d-invoices/filter-ids (:ids args))]
|
||||||
(into (set ids) specific-ids)))
|
(into (set ids) specific-ids)))
|
||||||
|
|
||||||
|
(defn all-ids-not-locked [all-ids]
|
||||||
|
(->> all-ids
|
||||||
|
(d/q '[:find [?i ...]
|
||||||
|
:in $ [?i ...]
|
||||||
|
:where
|
||||||
|
[?i :invoice/client ?c]
|
||||||
|
[(get-else $ ?c :client/locked-until #inst "2000-01-01") ?lu]
|
||||||
|
[?i :invoice/date ?d]
|
||||||
|
[(>= ?d ?lu)]]
|
||||||
|
(d/db conn))))
|
||||||
|
|
||||||
(defn void-invoices [context args _]
|
(defn void-invoices [context args _]
|
||||||
(let [_ (assert-admin (:id context))
|
(let [_ (assert-admin (:id context))
|
||||||
args (assoc args :id (:id context))
|
args (assoc args :id (:id context))
|
||||||
@@ -381,16 +392,7 @@
|
|||||||
[])]
|
[])]
|
||||||
[:reset (:db/id invoice) :invoice/expense-accounts accounts])))
|
[:reset (:db/id invoice) :invoice/expense-accounts accounts])))
|
||||||
|
|
||||||
(defn all-ids-not-locked [all-ids]
|
|
||||||
(->> all-ids
|
|
||||||
(d/q '[:find [?i ...]
|
|
||||||
:in $ [?i ...]
|
|
||||||
:where
|
|
||||||
[?i :invoice/client ?c]
|
|
||||||
[(get-else $ ?c :client/locked-until #inst "2000-01-01") ?lu]
|
|
||||||
[?i :invoice/date ?d]
|
|
||||||
[(>= ?d ?lu)]]
|
|
||||||
(d/db conn))))
|
|
||||||
|
|
||||||
(defn bulk-change-invoices [context args _]
|
(defn bulk-change-invoices [context args _]
|
||||||
(assert-admin (:id context))
|
(assert-admin (:id context))
|
||||||
|
|||||||
Reference in New Issue
Block a user