rules can be edited fully and more.

This commit is contained in:
Bryce Covert
2019-05-12 20:31:28 -07:00
parent 51691fa553
commit 76c903d16d
16 changed files with 132 additions and 38 deletions

View File

@@ -34,6 +34,8 @@
#_(assert-admin (:id context))
(let [existing-transaction (tr/get-by-id id)
deleted (deleted-accounts existing-transaction accounts)
_ (println existing-transaction)
_ (println "DELETING" deleted)
account-total (reduce + 0 (map (fn [x] (:percentage x)) accounts))
_ (when-not (dollars= 1.0 account-total)
(let [error (str "Account total (" account-total ") does not reach 100%")]