report updates for nick the greek.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
(defn process-sqs []
|
||||
(lc/with-context {:source "import-uploaded-invoices"}
|
||||
|
||||
(try
|
||||
(log/info "Fetching messages from sqs...")
|
||||
(doseq [message (:messages (sqs/receive-message {:queue-url (:invoice-import-queue-url env)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
args (assoc args
|
||||
:periods (filter identity (cond-> [(:date args)]
|
||||
(:include-comparison args) (conj (:comparison-date args)))))
|
||||
clients (d/pull-many (d/db conn) '[:client/name :db/id] [(:client-id args)])
|
||||
clients (d/pull-many (d/db conn) '[:client/code :client/name :db/id] [(:client-id args)])
|
||||
data (concat (->> (:balance-sheet-accounts data)
|
||||
(map (fn [b]
|
||||
(assoc b
|
||||
@@ -159,7 +159,7 @@
|
||||
(map (fn [b]
|
||||
(assoc b
|
||||
:period (:comparison-date args))))))
|
||||
pnl-data (l-reports/->PNLData args data (by :db/id clients))
|
||||
pnl-data (l-reports/->PNLData args data (by :db/id :client/code clients))
|
||||
report (l-reports/summarize-balance-sheet pnl-data)
|
||||
output-stream (ByteArrayOutputStream.)]
|
||||
(log/info report)
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
(let [data (<-graphql data)
|
||||
args (<-graphql args)
|
||||
clients (d/pull-many (d/db conn) '[:client/name :db/id] (:client-ids args))
|
||||
clients (d/pull-many (d/db conn) '[:client/code :client/name :db/id] (:client-ids args))
|
||||
data (->> data
|
||||
:periods
|
||||
(mapcat (fn [p1 p2]
|
||||
@@ -192,7 +192,7 @@
|
||||
(:accounts p2))
|
||||
)
|
||||
(:periods args)))
|
||||
pnl-data (l-reports/->PNLData args data (by :db/id clients))
|
||||
pnl-data (l-reports/->PNLData args data (by :db/id :client/code clients))
|
||||
report (l-reports/summarize-pnl pnl-data)
|
||||
output-stream (ByteArrayOutputStream.)]
|
||||
(pdf/pdf
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns auto-ap.square.core
|
||||
(:require [auto-ap.datomic :refer [conn remove-nils]]
|
||||
[auto-ap.time :as atime]
|
||||
[c(daily-results )lj-http.client :as client]
|
||||
[clj-http.client :as client]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as time]
|
||||
[clj-time.periodic :as periodic]
|
||||
@@ -12,7 +12,6 @@
|
||||
[datomic.api :as d]
|
||||
[mount.core :as mount]
|
||||
[unilog.context :as lc]
|
||||
#_{:clj-kondo/ignore [:unused-namespace]}
|
||||
[yang.scheduler :as scheduler]
|
||||
[clojure.core.async :as async]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user