Adds location filter.
This commit is contained in:
@@ -105,6 +105,12 @@
|
||||
'[(.contains ^String ?invoice-number ?invoice-number-like)]]}
|
||||
:args [(:invoice-number-like args)]})
|
||||
|
||||
(seq (:location args))
|
||||
(merge-query {:query {:in ['?location]
|
||||
:where ['[?e :invoice/expense-accounts ?eas]
|
||||
'[?eas :invoice-expense-account/location ?location]]}
|
||||
:args [(:location args)]})
|
||||
|
||||
(:sort args) (add-sorter-fields {"client" ['[?e :invoice/client ?c]
|
||||
'[?c :client/name ?sort-client]]
|
||||
"vendor" ['[?e :invoice/vendor ?v]
|
||||
|
||||
@@ -95,6 +95,12 @@
|
||||
'[?c :client/original-id ?original-id]]}
|
||||
:args [(:original-id args)]})
|
||||
|
||||
(seq (:location args))
|
||||
(merge-query {:query {:in ['?location]
|
||||
:where ['[?e :transaction/accounts ?tas]
|
||||
'[?tas :transaction-account/location ?location]]}
|
||||
:args [(:location args)]})
|
||||
|
||||
(:description args)
|
||||
(merge-query {:query {:in ['?description]
|
||||
:where ['[?e :transaction/description-original ?do]
|
||||
|
||||
@@ -485,6 +485,7 @@
|
||||
:amount_lte {:type :money}
|
||||
:amount_gte {:type :money}
|
||||
:invoice_number_like {:type 'String}
|
||||
:location {:type 'String}
|
||||
:start {:type 'Int}
|
||||
:per_page {:type 'Int}
|
||||
:sort {:type '(list :sort_item)}}
|
||||
@@ -588,6 +589,7 @@
|
||||
:bank_account_id {:type :id}
|
||||
:account_id {:type :id}
|
||||
:date_range {:type :date_range}
|
||||
:location {:type 'String}
|
||||
:amount_lte {:type :money}
|
||||
:amount_gte {:type :money}
|
||||
:description {:type 'String}
|
||||
|
||||
Reference in New Issue
Block a user