allows voids.

This commit is contained in:
2022-06-03 13:10:47 -07:00
parent 9dbc14977e
commit a8fb649dd6
2 changed files with 3 additions and 2 deletions

View File

@@ -475,7 +475,7 @@
(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 check))))
(#{:payment-type/cash :payment-type/debit :payment-type/balance-credit} (:payment/type 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]

View File

@@ -95,7 +95,8 @@
(url/map->query {:exact-match-id (:id transaction)}))}]]])]]]]])
[:span {:style {:margin-left "1em"}}]
(when (and (not= :cleared status)
(when (and (or (not= :cleared status)
(= :balance-credit type))
(not= :voided status)
(not transaction))