Adds new ledger import page
This commit is contained in:
@@ -270,19 +270,19 @@
|
||||
:when (and account-location (not= account-location location))]
|
||||
(field-validation-error (str "must be " account-location)
|
||||
[:transaction-rule/accounts i :transaction-rule-account/location]
|
||||
:form form-params))
|
||||
:form-params form-params))
|
||||
|
||||
(let [total (reduce + 0.0 (map :transaction-rule-account/percentage (:transaction-rule/accounts form-params)))]
|
||||
(when-not (dollars= 1.0 total)
|
||||
(form-validation-error (format "Expense accounts total (%d%%) must add to 100%%" (int (* 100.0 total)))
|
||||
:form form-params)))
|
||||
:form-params form-params)))
|
||||
|
||||
(when (and (:transaction-rule/bank-account form-params)
|
||||
(not (bank-account-belongs-to-client? (:transaction-rule/bank-account form-params)
|
||||
(:transaction-rule/client form-params))))
|
||||
(field-validation-error "does not belong to client"
|
||||
[:transaction-rule/bank-account]
|
||||
:form form-params)))
|
||||
:form-params form-params)))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user