From eb6441b36dd258622e64f75b25190f498e74921a Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 20 Nov 2023 21:54:21 -0800 Subject: [PATCH] balance sheet gives same warning --- src/cljc/auto_ap/ledger/reports.cljc | 3 ++- .../auto_ap/views/pages/ledger/balance_sheet.cljs | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/cljc/auto_ap/ledger/reports.cljc b/src/cljc/auto_ap/ledger/reports.cljc index 141fe263..9773131c 100644 --- a/src/cljc/auto_ap/ledger/reports.cljc +++ b/src/cljc/auto_ap/ledger/reports.cljc @@ -887,7 +887,8 @@ table (if (:include-comparison (:args pnl-data)) (append-deltas table) table)] - {:header (balance-sheet-headers pnl-data) + {:warning (warning-message pnl-data) + :header (balance-sheet-headers pnl-data) :rows table})) ) diff --git a/src/cljs/auto_ap/views/pages/ledger/balance_sheet.cljs b/src/cljs/auto_ap/views/pages/ledger/balance_sheet.cljs index 532ed631..99efd3c1 100644 --- a/src/cljs/auto_ap/views/pages/ledger/balance_sheet.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/balance_sheet.cljs @@ -260,10 +260,15 @@ NOTE: Please review the transactions we may have question for you here: https:// pnl-data (l-reports/->PNLData args pnl-data client-names) report (l-reports/summarize-balance-sheet pnl-data) client-count (count (set (map :client-id (:data pnl-data))))] - [rtable/table {:widths (cond-> (into [30 ] (repeat 13 client-count)) - (:include-comparison args) (into (repeat 13 (* 2 client-count)))) - :click-event ::investigate-clicked - :table report}])) + + [:<> [:h1.title "Balance Sheet - " (str/join ", " (map client-names (set (map :client-id (:data pnl-data)))))] + (when (:warning report) + [:div.notification.is-warning.is-light + (:warning report)]) + [rtable/table {:widths (cond-> (into [30 ] (repeat 13 client-count)) + (:include-comparison args) (into (repeat 13 (* 2 client-count)))) + :click-event ::investigate-clicked + :table report}]])) (defn balance-sheet-content [] (let [current-client @(re-frame/subscribe [::subs/client])