One last performance tweak
This commit is contained in:
@@ -42,16 +42,17 @@
|
||||
:in $ [?c ...]
|
||||
:where
|
||||
[?p :payment/client ?c]
|
||||
[?p :payment/type :payment-type/check]
|
||||
[?p :payment/date ?d ]
|
||||
[(>= ?d #inst "2018-01-01T08:00")]
|
||||
[(>= ?d #inst "2022-01-01T08:00")]
|
||||
[(< ?d #inst "2023-01-01T08:00")]
|
||||
[?p :payment/amount ?a]
|
||||
[?p :payment/type :payment-type/check]
|
||||
[?p :payment/vendor ?v]]
|
||||
(d/db conn)
|
||||
clients)
|
||||
(filter (fn [[_ _ a]]
|
||||
(>= a 600.0)))
|
||||
(take 200)
|
||||
|
||||
(sort-by (fn [[client _ amount]]
|
||||
[(:client/code client) amount]) ))))
|
||||
@@ -82,7 +83,7 @@
|
||||
[:th {:style {:width "10em"}}]
|
||||
]]
|
||||
[:tbody
|
||||
(for [[client vendor amount] (take 200 (get-1099-companies identity))]
|
||||
(for [[client vendor amount] (get-1099-companies identity)]
|
||||
[:tr (when (= flash-id
|
||||
(:db/id vendor))
|
||||
{:class "live-added"})
|
||||
|
||||
Reference in New Issue
Block a user