Adds ability to filter by category, adds invoice allowance as an account option
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
(->graphql (d-accounts/clientize result (:client_id args)))))
|
||||
|
||||
(defn upsert-account [context args _]
|
||||
(let [{{:keys [id client-overrides numeric-code location applicability account-set name type]} :account} (<-graphql args)]
|
||||
(let [{{:keys [id client-overrides numeric-code location applicability account-set name invoice-allowance type]} :account} (<-graphql args)]
|
||||
(when-not id
|
||||
(when (seq (d/query {:query {:find ['?e]
|
||||
:in '[$ ?account-set ?numeric-code]
|
||||
@@ -51,6 +51,8 @@
|
||||
:account/type (keyword "account-type" (clojure.core/name type))
|
||||
:account/applicability (or (enum->keyword applicability "account-applicability")
|
||||
:account-applicability/global)
|
||||
|
||||
:account/invoice-allowance (some-> invoice-allowance (enum->keyword "allowance"))
|
||||
:account/account-set account-set
|
||||
:account/location location
|
||||
:account/numeric-code (when-not id
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
:total_gte {:type :money}
|
||||
:type_name {:type 'String}
|
||||
:processor {:type :processor}
|
||||
:category {:type 'String}
|
||||
:start {:type 'Int}
|
||||
:per_page {:type 'Int}
|
||||
:sort {:type '(list :sort_item)}}
|
||||
|
||||
Reference in New Issue
Block a user