you can void checks now.
This commit is contained in:
@@ -64,5 +64,12 @@
|
||||
:invoices [(invoices/get-by-id (:invoice_id args))]})))
|
||||
|
||||
|
||||
|
||||
|
||||
(defn void-check [context {id :check_id} value]
|
||||
(let [check (checks/get-by-id id)]
|
||||
(assert-can-see-company (:id context) (:company-id check))
|
||||
(assert (= "pending" (:status check)))
|
||||
(checks/update! {:id id
|
||||
:amount 0
|
||||
:status "voided"})
|
||||
(-> (checks/get-by-id id)
|
||||
(->graphql))))
|
||||
|
||||
Reference in New Issue
Block a user