really improved vendor dialog code.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
(s/def ::name ::required-identifier)
|
||||
(s/def ::hidden boolean?)
|
||||
(s/def ::print-as (s/nilable string?))
|
||||
(s/def ::terms (s/nilable int?))
|
||||
|
||||
(s/def ::invoice-reminder-schedule (s/nilable #{"Weekly" "Never" nil}))
|
||||
|
||||
@@ -25,6 +26,7 @@
|
||||
(s/keys :req-un [::name]
|
||||
:opt-un [::code
|
||||
::default-account-id
|
||||
::terms
|
||||
::hidden
|
||||
::id
|
||||
::print-as
|
||||
@@ -34,8 +36,7 @@
|
||||
::address])
|
||||
|
||||
(s/or :hidden #(= (:hidden %) true)
|
||||
:has-expense-account (and (s/keys :req-un [::default-account-id])
|
||||
#(not (nil? (:default-account-id %)))))))
|
||||
:has-expense-account #(not (nil? (:id (:default-account %)))))))
|
||||
|
||||
|
||||
(def vendor-spec (apply hash-map (drop 1 (s/form ::vendor))))
|
||||
|
||||
Reference in New Issue
Block a user