allows voids.
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user