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

@@ -304,8 +304,9 @@
(if (-> pnl-data :args :column-per-location)
(mapcat
(fn [p]
(cond-> [(merge {:value (or (
-> p :filters :location) "Total")
(cond-> [(merge {:value (or (when (-> p :filters :location)
(str ((-> p :client-codes) (-> p :filters :client-id)) "-" (-> p :filters :location)))
"Total")
:align :right}
(:cell-args p))
(merge {:value "%"
@@ -470,8 +471,9 @@
(if (-> pnl-data :args :column-per-location)
[(location-summary-table (mapcat identity (for [[period i] (map vector (-> pnl-data :args :periods ) (range))]
(concat
(for [location (set (map second (client-locations pnl-data)))]
(for [[client-id location] (client-locations pnl-data)]
(-> pnl-data
(filter-client client-id)
(filter-location location)
(filter-period period)
(zebra i)))
@@ -488,9 +490,10 @@
:details
(doall (if (-> pnl-data :args :column-per-location)
[(location-detail-table (mapcat identity (for [[period i] (map vector (-> pnl-data :args :periods ) (range))]
(concat
(for [location (set (map second (client-locations pnl-data)))]
(concat
(for [[client-id location] (client-locations pnl-data)]
(-> pnl-data
(filter-client client-id)
(filter-location location)
(filter-period period)
(zebra i)))
@@ -557,4 +560,4 @@
:rows table}))
(defrecord PNLData [args data client-names])
(defrecord PNLData [args data client-codes])