Description filter

This commit is contained in:
Bryce Covert
2020-03-21 12:51:56 -07:00
parent c6d09a07e9
commit bb59be6aea
5 changed files with 142 additions and 2 deletions

View File

@@ -59,6 +59,8 @@
(merge-query {:query {:in ['?vendor-id]
:where ['[?e :transaction/vendor ?vendor-id]]}
:args [(:vendor-id args)]})
(:amount-gte args)
(merge-query {:query {:in ['?amount-gte]
:where ['[?e :transaction/amount ?a]
@@ -100,6 +102,12 @@
'[?c :client/original-id ?original-id]]}
:args [(:original-id args)]})
(:description args)
(merge-query {:query {:in ['?description]
:where ['[?e :transaction/description-original ?do]
'[(.contains ?do ?description)]]}
:args [(:description args)]})
true
(merge-query {:query {:find ['?base-date '?e] :where ['[?e :transaction/id]
'[?e :transaction/date ?base-date]]}}))]

View File

@@ -401,6 +401,7 @@
:date_range {:type :date_range}
:amount_lte {:type :money}
:amount_gte {:type :money}
:description {:type 'String}
:start {:type 'Int}
:sort_by {:type 'String}
:asc {:type 'Boolean}