a bunch of filtering fixes.

This commit is contained in:
Bryce Covert
2020-05-20 07:51:07 -07:00
parent 3678997013
commit d30dfb5e34
8 changed files with 125 additions and 6 deletions

View File

@@ -366,7 +366,7 @@
(defn void-check [context {id :payment_id} value]
(let [check (d-checks/get-by-id id)]
(assert (or (= :payment-status/pending (:payment/status check))
(#{:payment-type/cash} (:payment/type check))))
(#{:payment-type/cash :payment-type/debit} (:payment/type check))))
(assert-can-see-client (:id context) (:db/id (:payment/client check)))
(let [removing-payments (mapcat (fn [x]
(let [invoice (:invoice-payment/invoice x)