diff --git a/src/clj/auto_ap/parse/csv.clj b/src/clj/auto_ap/parse/csv.clj index b7017b19..feb7a3a2 100644 --- a/src/clj/auto_ap/parse/csv.clj +++ b/src/clj/auto_ap/parse/csv.clj @@ -172,8 +172,8 @@ (map (fn [[invoice-number date due amount standard :as row]] {:vendor-code "Performance Food Group - LEDYARD" :invoice-number invoice-number - :date (some-> date not-empty (parse-date-fallover ["MM/dd/yyyy"])) - :due (some-> due not-empty (parse-date-fallover ["MM/dd/yyyy"])) + :date (some-> date not-empty (parse-date-fallover ["MM/dd/yy"])) + :due (some-> due not-empty (parse-date-fallover ["MM/dd/yy"])) :total (str/replace amount #"[\$,]" "") :text (str/join " " row) :full-text (str/join " " row)})) diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 63601c55..05878172 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -418,6 +418,16 @@ :total #" Total:\s+([\d\.]+)"} :parser {:date [:clj-time "MMM dd, yyyy"]}} + ;; BiRite -- parent company for a&b produce + {:vendor "BiRite" + :keywords [#"BIRITE"] + :extract {:date #"([0-9]+/[0-9]+/[0-9]+)" + :customer-identifier #"BILL TO.*\n.*?\s{2,}(.*?)\s{2,}" + :invoice-number #"INVOICE#\n.*?(\d+)\n" + :total #"INV TOTAL \s+([\d\.\-]+)"} + :parser {:date [:clj-time "MM/dd/yyyy"] + :total [:trim-commas-and-negate nil]}} + ;; A&B {:vendor "A&B Produce" :keywords [#"ABProduce"]