One last performance tweak

This commit is contained in:
2023-01-15 05:28:54 -08:00
parent 14b1847a90
commit f7ff23d2da

View File

@@ -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"})