Fixes issues customers have run into with new experience.

This commit is contained in:
Bryce
2024-04-08 21:32:58 -07:00
parent ae3ceb9ffe
commit d31d2297ef
3 changed files with 28 additions and 8 deletions

View File

@@ -259,7 +259,9 @@
(table* grid-spec
identity
request)])
(:title grid-spec)))
(if (string? (:title grid-spec))
(:title grid-spec)
((:title grid-spec) request))))
(wrap-trim-client-ids)
(query-params/wrap-parse-query-params (or (:parse-query-params grid-spec)
(default-parse-query-params grid-spec)))

View File

@@ -322,7 +322,8 @@
{})
(vals)))
all-credits-or-debits (or (every? #(<= % 0.0) vendor-totals)
(every? #(>= % 0.0) vendor-totals))]
(every? #(>= % 0.0) vendor-totals))
total (reduce + 0.0 vendor-totals)]
[:div {:hx-target "this"
@@ -349,7 +350,9 @@
:class "relative"}
(if (> (count (:ids params)) 0)
(str "Pay " (count (:ids params)) " invoices")
(format "Pay %d invoices ($%,.2f)"
(count (:ids params))
(or total 0.0))
"Pay")
(when (or (= 0 (count ids))
(> selected-client-count 1))
@@ -872,7 +875,8 @@
:body (mm/default-step-body
{}
[:div.flex.flex-col.space-y-2
(for [ba (:bank-accounts linear-wizard)]
(for [ba (:bank-accounts linear-wizard)
:when (:bank-account/visible ba)]
(bank-account-card ba can-handwrite? credit-only?))])
:footer
nil
@@ -1133,10 +1137,7 @@
(->> (dc/q '[:find ?i
:in $ [?i ...]
:where [?i :invoice/status :invoice-status/unpaid]
[?i :invoice/client ?c]
[(get-else $ ?c :client/locked-until #inst "2000-01-01") ?lu]
[?i :invoice/date ?d]
[(>= ?d ?lu)]]
[?i :invoice/client ?c] ]
(dc/db conn)
ids)
(map first)))