fixes rule page
This commit is contained in:
@@ -43,7 +43,8 @@
|
||||
:account/name name
|
||||
:account/search-terms name
|
||||
:account/type (keyword "account-type" (clojure.core/name type))
|
||||
:account/applicability (enum->keyword applicability "account-applicability")
|
||||
:account/applicability (or (enum->keyword applicability "account-applicability")
|
||||
:account-applicability/global)
|
||||
:account/account-set account-set
|
||||
:account/location location
|
||||
:account/numeric-code (when-not id
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
[:div.column.is-narrow
|
||||
[:p.help "Location"]
|
||||
[:div.control
|
||||
(println account)
|
||||
(if-let [forced-location (:location account)]
|
||||
[:div.select
|
||||
[:select {:disabled "disabled" :style {:width "5em"} :value forced-location} [:option {:value forced-location} forced-location]]]
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
|
||||
chooseable-expense-accounts @(re-frame/subscribe [::subs/all-accounts])
|
||||
change-event [::all-events/change-form [::expense-accounts]]]
|
||||
(println form)
|
||||
[:div
|
||||
[:h1.title "Import Invoices from Integreat Excel"]
|
||||
(when (seq vendors-not-found)
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
[:vendor [:name :id]]
|
||||
[:client [:name :id]]
|
||||
[:bank-account [:name :id]]
|
||||
[:accounts [[:account [:id :name :numeric-code]]
|
||||
[:accounts [[:account [:id :name :numeric-code :location]]
|
||||
:id
|
||||
:percentage
|
||||
:location]]
|
||||
])
|
||||
:location]]])
|
||||
|
||||
@@ -146,27 +146,24 @@
|
||||
(re-frame/reg-event-db
|
||||
::editing
|
||||
(fn [db [_ which]]
|
||||
(let [accounts-by-id @(re-frame/subscribe [::subs/all-accounts-by-id (:client which)])]
|
||||
(-> db (forms/start-form ::form (-> which
|
||||
(select-keys [:description
|
||||
:id
|
||||
:client
|
||||
:bank-account
|
||||
:note
|
||||
:amount-lte
|
||||
:amount-gte
|
||||
:dom-lte
|
||||
:dom-gte
|
||||
:vendor
|
||||
:accounts
|
||||
:yodlee-merchant
|
||||
:transaction-approval-status])
|
||||
(update :accounts (fn [xs]
|
||||
(mapv #(-> %
|
||||
(assoc :amount-percentage (* (:percentage %) 100.0))
|
||||
(update :account (fn [a]
|
||||
(accounts-by-id (:id a)))))
|
||||
xs)))))))))
|
||||
(-> db (forms/start-form ::form (-> which
|
||||
(select-keys [:description
|
||||
:id
|
||||
:client
|
||||
:bank-account
|
||||
:note
|
||||
:amount-lte
|
||||
:amount-gte
|
||||
:dom-lte
|
||||
:dom-gte
|
||||
:vendor
|
||||
:accounts
|
||||
:yodlee-merchant
|
||||
:transaction-approval-status])
|
||||
(update :accounts (fn [xs]
|
||||
(mapv #(-> %
|
||||
(assoc :amount-percentage (* (:percentage %) 100.0)))
|
||||
xs))))))))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
|
||||
Reference in New Issue
Block a user