Allows resetting expense accounts
This commit is contained in:
@@ -374,8 +374,12 @@
|
||||
set
|
||||
(conj "A")
|
||||
(conj "HQ"))))]
|
||||
|
||||
(when-not (dollars= (Math/abs (:transaction/amount existing-transaction)) account-total)
|
||||
|
||||
(when (and (not (dollars= (Math/abs (:transaction/amount existing-transaction)) account-total))
|
||||
(or
|
||||
(and (= approval_status :unapproved)
|
||||
(> (count accounts) 0))
|
||||
(not= approval_status :unapproved)))
|
||||
(let [error (str "Expense account total (" account-total ") does not equal transaction total (" (Math/abs (:transaction/amount existing-transaction)) ")")]
|
||||
(throw (ex-info error {:validation-error error}))))
|
||||
(when missing-locations
|
||||
|
||||
Reference in New Issue
Block a user