fixes rule page
This commit is contained in:
@@ -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