diff --git a/src/clj/auto_ap/datomic/checks.clj b/src/clj/auto_ap/datomic/checks.clj index f9ecfcb4..66398559 100644 --- a/src/clj/auto_ap/datomic/checks.clj +++ b/src/clj/auto_ap/datomic/checks.clj @@ -59,6 +59,9 @@ (= "client" (:sort-by args)) #(-> % :payment/client :client/name) + (= "vendor" (:sort-by args)) + #(-> % :payment/vendor :vendor/name (or "") (.toLowerCase )) + :else (keyword "payment" (:sort-by args)))) diff --git a/src/cljs/auto_ap/views/pages/checks.cljs b/src/cljs/auto_ap/views/pages/checks.cljs index 227b6a08..9a29e820 100644 --- a/src/cljs/auto_ap/views/pages/checks.cljs +++ b/src/cljs/auto_ap/views/pages/checks.cljs @@ -163,8 +163,9 @@ [:td (gstring/format "$%.2f" amount )] [:td status] [:td - (when (or (= ":pending" status) - (#{":cash" ":debit" :cash :debit} type)) + (when (or (= :pending status) + (and (#{":cash" ":debit" :cash :debit} type) + (not= :voided status))) [:button.button.is-warning.is-outlined {:on-click (dispatch-event [::void-check i])} [:span [:span.icon [:i.fa.fa-minus-circle]]]]) (if s3-url [:a.tag {:href s3-url :target "_new"} [:i.fa.fa-money-check] [:span.icon [:i.fa.fa-money]] (str " " check-number " (" (gstring/format "$%.2f" amount ) ")")]