a much better general ledger profit and loss.
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
(re-frame/reg-event-db
|
||||
::editing
|
||||
(fn [db [_ which]]
|
||||
(let [accounts-by-id @(re-frame/subscribe [::subs/accounts-by-id (:client 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
|
||||
@@ -155,7 +155,8 @@
|
||||
(update :accounts (fn [xs]
|
||||
(mapv #(-> %
|
||||
(assoc :amount-percentage (* (:percentage %) 100.0))
|
||||
(update :account (fn [a] (accounts-by-id (:id a)))))
|
||||
(update :account (fn [a]
|
||||
(accounts-by-id (:id a)))))
|
||||
xs)))))))))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user