Merge branch 'master' of codecommit://integreat
This commit is contained in:
@@ -129,6 +129,25 @@
|
||||
:placeholder "e.g., ABC-456"
|
||||
:size :small}))
|
||||
|
||||
(com/field {:label "Account Code"}
|
||||
[:div.flex.space-x-4.items-baseline
|
||||
(com/int-input {:name "numeric-code-gte"
|
||||
:id "numeric-code-gte"
|
||||
:hx-preserve "true"
|
||||
:class "hot-filter w-20"
|
||||
:value (:numeric-code-gte (:query-params request))
|
||||
:placeholder "40000"
|
||||
:size :small})
|
||||
[:div.align-baseline
|
||||
"to"]
|
||||
(com/int-input {:name "numeric-code-lte"
|
||||
:hx-preserve "true"
|
||||
:id "numeric-code-lte"
|
||||
:class "hot-filter w-20"
|
||||
:value (:numeric-code-lte (:query-params request))
|
||||
:placeholder "50000"
|
||||
:size :small})])
|
||||
|
||||
(com/field {:label "Amount"}
|
||||
[:div.flex.space-x-4.items-baseline
|
||||
(com/money-input {:name "amount-gte"
|
||||
@@ -199,22 +218,23 @@
|
||||
'[?oe :invoice/invoice-number ?invoice-number]]}
|
||||
:args [(:invoice-number args)]})
|
||||
|
||||
(or (seq (:numeric-code args))
|
||||
(or (:numeric-code-lte args)
|
||||
(:numeric-code-gte args)
|
||||
(:account args)
|
||||
(:db/id (:bank-account args))
|
||||
(not-empty (:location args)))
|
||||
(merge-query {:query {:where ['[?e :journal-entry/line-items ?li]]}})
|
||||
|
||||
(seq (:numeric-code args))
|
||||
(merge-query {:query {:in ['[[?from-numeric-code ?to-numeric-code]]]
|
||||
(or (:numeric-code-gte args)
|
||||
(:numeric-code-lte args))
|
||||
(merge-query {:query {:in '[?from-numeric-code ?to-numeric-code]
|
||||
:where ['[?li :journal-entry-line/account ?a]
|
||||
'(or-join [?a ?c]
|
||||
[?a :account/numeric-code ?c]
|
||||
[?a :bank-account/numeric-code ?c])
|
||||
'[(>= ?c ?from-numeric-code)]
|
||||
'[(<= ?c ?to-numeric-code)]]}
|
||||
:args [(vec (for [{:keys [from to]} (:numeric-code args)]
|
||||
[(or from 0) (or to 99999)]))]})
|
||||
:args [(or (:numeric-code-gte args) 0) (or (:numeric-code-lte args) 99999)]})
|
||||
|
||||
(seq (:account args))
|
||||
(merge-query {:query {:in ['?a3]
|
||||
@@ -347,6 +367,8 @@
|
||||
[:start {:optional true :default 0} [:maybe :int]]
|
||||
[:amount-gte {:optional true} [:maybe :double]]
|
||||
[:amount-lte {:optional true} [:maybe :double]]
|
||||
[:numeric-code-gte {:optional true} [:maybe nat-int?]]
|
||||
[:numeric-code-lte {:optional true} [:maybe nat-int?]]
|
||||
[:vendor {:optional true :default nil} [:maybe [:entity-map {:pull [:db/id :vendor/name]}]]]
|
||||
[:bank-account {:optional true :default nil} [:maybe [:entity-map {:pull [:db/id :bank-account/name]}]]]
|
||||
[:account {:optional true :default nil} [:maybe [:entity-map {:pull [:db/id :account/name]}]]]
|
||||
@@ -477,9 +499,7 @@
|
||||
:hide? (fn [args]
|
||||
(and (= (count (:clients args)) 1)
|
||||
(= 1 (count (:client/locations (:client args))))))
|
||||
:render (fn [x] [:div.flex.items-center.gap-2 (-> x :invoice/client :client/name)
|
||||
(map #(com/pill {:color :primary} (-> % :invoice-expense-account/location))
|
||||
(:invoice/expense-accounts x)) ])}
|
||||
:render (fn [x] [:div.flex.items-center.gap-2 (-> x :journal-entry/client :client/name) ])}
|
||||
|
||||
{:key "vendor"
|
||||
:name "Vendor"
|
||||
|
||||
@@ -393,6 +393,7 @@
|
||||
check-number))}
|
||||
{:key "status"
|
||||
:name "Status"
|
||||
:sort-key "status"
|
||||
:render (fn [{:payment/keys [status]}]
|
||||
(condp = status
|
||||
:payment-status/cleared
|
||||
@@ -406,10 +407,12 @@
|
||||
""))}
|
||||
{:key "date"
|
||||
:name "Date"
|
||||
:sort-key "date"
|
||||
:show-starting "lg"
|
||||
:render (fn [{:payment/keys [date]}]
|
||||
(some-> date (atime/unparse-local atime/normal-date)))}
|
||||
{:key "amount"
|
||||
:sort-key "amount"
|
||||
:name "Amount"
|
||||
:render (fn [{:payment/keys [amount]}]
|
||||
(some->> amount (format "$%.2f")))}
|
||||
|
||||
Reference in New Issue
Block a user