taking care of errros.

This commit is contained in:
2021-11-25 08:36:24 -08:00
parent b0afa05c2e
commit 1d32f19ce3
3 changed files with 23 additions and 8 deletions

View File

@@ -128,7 +128,10 @@
(when (nil? (:account_id expense-account))
(throw (ex-info "Expense account is missing account" {:validation-error "Expense account is missing account"})))))
(throw (ex-info "Expense account is missing account" {:validation-error "Expense account is missing account"})))
(when (nil? (:amount expense-account))
(throw (ex-info "Expense account does not have an amount specified." {:validation-error "Expense account does not have an amount specified."})))))
(defn assert-invoice-amounts-add-up [{:keys [expense_accounts total]}]