putting the right fields onto the balance sheet.

This commit is contained in:
Bryce Covert
2019-04-16 06:55:46 -07:00
parent d2473ca915
commit d3dce3cd22
2 changed files with 1 additions and 17 deletions

View File

@@ -142,24 +142,12 @@
(->graphql
{:balance-sheet-groupings
(-> []
(into (->> (get accounts "Assets")
(map (fn [[n accounts]]
{:name n
:grouping-type "Assets"
:accounts accounts}
))))
(into (->> (get accounts "Expenses")
(map (fn [[n accounts]]
{:name n
:grouping-type "Expenses"
:accounts accounts}
))))
(into (->> (get accounts "Liabilities")
(map (fn [[n accounts]]
{:name n
:grouping-type "Liabilities"
:accounts accounts}
)))))})))
#_(get-profit-and-loss nil {:client_id [:client/code "CBC"]

View File

@@ -200,12 +200,8 @@
(if @(re-frame/subscribe [::loading])
[:div [:i.icon.fa.fa-spin.fa-spinner]]
[:div
[:h2.title "Assets"]
[grouping @(re-frame/subscribe [::assets])]
[:h2.title "Expenses"]
[grouping @(re-frame/subscribe [::expenses])]
[:h2.title "Liabilities"]
[grouping @(re-frame/subscribe [::liabilities])]])
[grouping @(re-frame/subscribe [::expenses])]])
]))
{:component-will-mount #(re-frame/dispatch-sync [::params-change {:from-date (date->str (t/minus (local-now) (t/period :years 1)) standard)
:to-date (date->str (local-now) standard)}]) }))