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