progress on making check tests work.

This commit is contained in:
2023-03-24 16:11:18 -07:00
parent 21f4dee7b2
commit 8508fbe70c
2 changed files with 87 additions and 1 deletions

View File

@@ -491,7 +491,8 @@
(defn void-payment [context {id :payment_id} _]
(let [check (d-checks/get-by-id id)]
(assert (or (= :payment-status/pending (:payment/status check))
(#{:payment-type/cash :payment-type/debit :payment-type/balance-credit} (:payment/type check))))
(#{:payment-type/cash :payment-type/debit :payment-type/balance-credit} (:payment/type check)))
(pr-str check))
(assert-can-see-client (:id context) (:db/id (:payment/client check)))
(assert-not-locked (:db/id (:payment/client check)) (:payment/date check))
(let [removing-payments (mapcat (fn [x]