Fixes issues
This commit is contained in:
@@ -738,7 +738,7 @@
|
|||||||
{:vendor "Reel Produce"
|
{:vendor "Reel Produce"
|
||||||
:keywords [#"reelproduce.com" #"Statem"]
|
:keywords [#"reelproduce.com" #"Statem"]
|
||||||
:extract {:date #"\s*([0-9]+/[0-9]+/[0-9]+)"
|
:extract {:date #"\s*([0-9]+/[0-9]+/[0-9]+)"
|
||||||
:customer-identifier #"To:\s*\n\s+(.*?)\s{2,}"
|
:customer-identifier #"ELECTRONICALLY.*\n\s*(.*?)\s{2,}"
|
||||||
:invoice-number #"#(\d+)"
|
:invoice-number #"#(\d+)"
|
||||||
:total #"([\d\-,]+\.\d{2,2})"}
|
:total #"([\d\-,]+\.\d{2,2})"}
|
||||||
:parser {:date [:clj-time "MM/dd/yyyy"]
|
:parser {:date [:clj-time "MM/dd/yyyy"]
|
||||||
|
|||||||
@@ -103,12 +103,15 @@
|
|||||||
:numeric-code (:numeric_code account)
|
:numeric-code (:numeric_code account)
|
||||||
:name (:name account)
|
:name (:name account)
|
||||||
:sample sample
|
:sample sample
|
||||||
:period {:start ( coerce/to-date (:start p)) :end (coerce/to-date (time/plus (:end p) (time/days 1)))}}))
|
:period {:start ( coerce/to-date (:start p)) :end (coerce/to-date (:end p))}}))
|
||||||
|
|
||||||
args (assoc (:form-params request)
|
args (assoc (:form-params request)
|
||||||
:periods (map (fn [d] {:start ( coerce/to-date (:start d)) :end ( coerce/to-date (:end d))}) periods))
|
:periods (map (fn [d]
|
||||||
|
{:start ( coerce/to-date (:start d)) :end ( coerce/to-date (:end d))}) periods))
|
||||||
clients (pull-many (dc/db conn) [:client/code :client/name :db/id :client/feature-flags] client-ids)
|
clients (pull-many (dc/db conn) [:client/code :client/name :db/id :client/feature-flags] client-ids)
|
||||||
|
|
||||||
pnl-data (l-reports/->PNLData args data (by :db/id :client/code clients))
|
pnl-data (l-reports/->PNLData args data (by :db/id :client/code clients))
|
||||||
|
#_#__ (clojure.pprint/pprint pnl-data)
|
||||||
report (l-reports/summarize-pnl pnl-data)]
|
report (l-reports/summarize-pnl pnl-data)]
|
||||||
(alog/info ::profit-and-loss :params args)
|
(alog/info ::profit-and-loss :params args)
|
||||||
{:data report
|
{:data report
|
||||||
|
|||||||
Reference in New Issue
Block a user