customized transactions.
This commit is contained in:
@@ -45,7 +45,8 @@
|
||||
(re-frame/reg-event-db
|
||||
::editing
|
||||
(fn [db [_ which potential-payment-matches potential-transaction-rule-matches]]
|
||||
(let [locations @(re-frame/subscribe [::subs/locations-for-client (:id (:client which))])]
|
||||
(let [locations @(re-frame/subscribe [::subs/locations-for-client (:id (:client which))])
|
||||
accounts-by-id @(re-frame/subscribe [::subs/accounts-by-id (:client which)])]
|
||||
(forms/start-form db ::form
|
||||
(-> which
|
||||
(select-keys [:vendor :amount :payment :client :description-original
|
||||
@@ -59,7 +60,7 @@
|
||||
(assoc :potential-transaction-rule-matches (if (:matched-rule which)
|
||||
nil
|
||||
potential-transaction-rule-matches))
|
||||
(update :accounts expense-accounts-field/from-graphql (:amount which) locations))))))
|
||||
(update :accounts expense-accounts-field/from-graphql accounts-by-id (:amount which) locations))))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::changed
|
||||
|
||||
Reference in New Issue
Block a user