fixes for randy etc.

This commit is contained in:
2022-07-21 07:12:15 -07:00
parent eba3a5dce3
commit a9a07f3801
2 changed files with 13 additions and 1 deletions

View File

@@ -295,6 +295,16 @@
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas-and-negate nil]}}
;; WINE WAREHOUSE CREDIT 4
{:vendor "Wine Warehouse"
:keywords [#"WINE WAREHOUSE" #"Credit Memo"]
:extract {:date #"Credit Memo Number/Date\s+\d+\s+([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"Ship-To-Party.*\n(.*?)\s{2,}"
:invoice-number #"Credit Memo Number/Date\s+(\d+)"
:total #"Total\s+([0-9]+\.[0-9]{2}-)"}
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas-and-negate nil]}}
;; WINE WAREHOUSE 2
{:vendor "Wine Warehouse"
:keywords [#"WINE WAREHOUSE" #"Bill-to-Party"]

View File

@@ -427,7 +427,9 @@
_ (s3/put-object (:data-bucket env)
s3-location
(io/input-stream tempfile)
{:content-type "application/pdf"
{:content-type (if (= "csv" extension)
"text/csv"
"application/pdf")
:content-length (.length tempfile)})
imports (->> (parse/parse-file (.getPath tempfile) filename)
(map #(assoc %