huge number of changes to start making all usages of expense accounts dynamic.
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
[auto-ap.subs :as subs]))
|
||||
|
||||
(defn vendor-dialog [{:keys [vendor save-event change-event id] {:keys [name]} :vendor}]
|
||||
(println (s/explain ::entity/vendor vendor) )
|
||||
(let [clients-by-id @(re-frame/subscribe [::subs/clients-by-id])]
|
||||
(let [clients-by-id @(re-frame/subscribe [::subs/clients-by-id])
|
||||
chooseable-expense-accounts @(re-frame/subscribe [::subs/chooseable-expense-accounts]) ]
|
||||
[action-modal {:id id
|
||||
:title [:span (if (:id vendor)
|
||||
(str "Edit " (or name "<vendor>"))
|
||||
@@ -51,23 +51,12 @@
|
||||
[horizontal-field
|
||||
[:label.label "Default"]
|
||||
[bind-field
|
||||
[typeahead {:matches (map (fn [[k v]] [k (:name v)]) chooseable-expense-accounts)
|
||||
[typeahead {:matches (map (fn [x] [(:id x) (str (:numeric-code x) " - " (:name x))]) chooseable-expense-accounts)
|
||||
:type "typeahead"
|
||||
:field [:default-expense-account]
|
||||
:spec ::entity/default-expense-account
|
||||
:field [:default-account-id]
|
||||
:event change-event
|
||||
:subscription vendor}]]]
|
||||
#_[horizontal-field
|
||||
[:label.label "Code"]
|
||||
[:div.control
|
||||
|
||||
[bind-field
|
||||
[:input.input.is-expanded {:type "text"
|
||||
:field :code
|
||||
:spec ::entity/code
|
||||
:event change-event
|
||||
:subscription vendor}]]
|
||||
[:p.help "The vendor code is used for invoice parsing. Only one vendor at a time can use a code"]]]
|
||||
|
||||
|
||||
[:h2.subtitle "Address"]
|
||||
[address-field {:field [:address]
|
||||
@@ -163,11 +152,4 @@
|
||||
:event change-event
|
||||
:subscription vendor}]]
|
||||
" Never"]]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(when (:saving? vendor) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]))
|
||||
|
||||
Reference in New Issue
Block a user