diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 85a4c6c4..9349b583 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -738,7 +738,7 @@ {:vendor "Reel Produce" :keywords [#"reelproduce.com" #"Statem"] :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+)" :total #"([\d\-,]+\.\d{2,2})"} :parser {:date [:clj-time "MM/dd/yyyy"] diff --git a/src/clj/auto_ap/ssr/ledger/profit_and_loss.clj b/src/clj/auto_ap/ssr/ledger/profit_and_loss.clj index 2fc49ff0..ec0e292d 100644 --- a/src/clj/auto_ap/ssr/ledger/profit_and_loss.clj +++ b/src/clj/auto_ap/ssr/ledger/profit_and_loss.clj @@ -103,12 +103,15 @@ :numeric-code (:numeric_code account) :name (:name account) :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) - :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) 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)] (alog/info ::profit-and-loss :params args) {:data report