report updates for nick the greek.

This commit is contained in:
2022-05-12 16:34:07 -07:00
parent e8f1a0d734
commit 11722415fc
6 changed files with 29 additions and 20 deletions

View File

@@ -82,7 +82,9 @@
encode-period
(:periods (:data db)))
:clients (mapv #(select-keys % [:name :id]) (:clients (:data db))) }
:db (dissoc db :report)})))
:db (-> db
(dissoc :report)
(update-in [:data :clients] #(into [] (filter seq %))))})))
(defn email-body [report-url]
(js/encodeURIComponent
@@ -440,11 +442,11 @@ NOTE: Please review the transactions we may have question for you here: https://
)
(:accounts p2)))
(:periods args)))
client-names (->> @(re-frame/subscribe [::subs/clients-by-id])
client-codes (->> @(re-frame/subscribe [::subs/clients-by-id])
(map (fn [[k v]]
[k (:name v)]))
[k (:code v)]))
(into {}))
pnl-data (l-reports/->PNLData args pnl-data client-names)
pnl-data (l-reports/->PNLData args pnl-data client-codes)
report (l-reports/summarize-pnl pnl-data)
table (rtable/concat-tables (concat (:summaries report) (:details report)))]
[:div