From 1e9d58c6d28f7d84494ecc50d6cd7604fae44b3e Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 16 Nov 2022 08:12:18 -0800 Subject: [PATCH] test. --- src/clj/auto_ap/graphql/ledger.clj | 10 +++++++--- .../views/pages/ledger/profit_and_loss_detail.cljs | 10 ++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 72faf427..4eb253bf 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -512,7 +512,8 @@ c (d/pull (d/db conn) '[:client/locations] client-id) ] location (:client/locations c) category (:categories input) - :let [all-journal-entries (->> (get-ledger-page context + :let [category (<-graphql category) + all-journal-entries (->> (get-ledger-page context {:filters {:client_id client-id :location location :date_range (:date_range input) @@ -550,7 +551,7 @@ [(conj acc next-je) next-je])) [] (sort-by :date journal-entries)))]] - {:category category + {:category (->graphql category) :client_id client-id :location location :account (or account @@ -753,7 +754,10 @@ (def enums {:ledger_category {:values [{:enum-value :sales} {:enum-value :cogs} - {:enum-value :payroll}]}}) + {:enum-value :payroll} + {:enum-value :controllable} + {:enum-value :fixed_overhead} + {:enum-value :ownership_controllable}]}}) (def resolvers diff --git a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs index ec5cf48e..559f2882 100644 --- a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs @@ -48,7 +48,10 @@ :end (date->str (:end (:date-range (:data db))) standard)} :categories [:sales :cogs - :payroll]} + :payroll + :controllable + :fixed-overhead + :ownership-controllable]} [[:categories [[:journal-entries [:description :date :debit :credit :location :running-balance @@ -110,7 +113,10 @@ NOTE: Please review the transactions we may have question for you here: https:// :end (date->str (:end (:date-range (:data db))) standard)} :categories [:sales :cogs - :payroll]} + :payroll + :controllable + :fixed-overhead + :ownership-controllable]} [:url :name]]]} :on-success [::received-pdf]} :set-uri-params {:date-range (:date-range (:data db))