From 85697cea9c99c6539da8b8145d8436653174b9af Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 14 Sep 2021 17:07:10 -0700 Subject: [PATCH] added support for statements blue marine and fresh and best. --- src/clj/auto_ap/parse/templates.clj | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 4090a8d4..8ce83d8b 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -433,7 +433,32 @@ :multi #"\n" :multi-match? #"\s+INVOICE\s+"} + ;; blue marine + {:vendor "Blue Marine" + :keywords [#"Blue Marine, Inc"] + :extract {:date #"([0-9]+/[0-9]+/[0-9]+)" + :customer-identifier #"Total (.*?)\s{2,}" + :invoice-number #"(\d{6,})" + :total #"([\-0-9,\.]+)$"} + :parser {:date [:clj-time "MM/dd/yyyy"] + :total [:trim-commas-and-negate nil]} + :multi #"\n" + :multi-match? #"(Invoice|Credit Memo)\s{2,}"} + ;; FRESH AND BELT + + ;; statempnt + {:vendor "Fresh and Best Produce" + :keywords [#"freshbestproduce" #"Statement"] + :extract {:date #"([0-9]+/[0-9]+/[0-9]+)" + :customer-identifier #"Bill To[^\n]+\n([A-Za-z ']+)" + :invoice-number #"INV #(\d+)\." + :total #"Amount\s+\$([0-9\.]+)\."} + :parser {:date [:clj-time "MM/dd/yyyy"] + :total [:trim-commas-and-negate nil]} + :multi #"\n" + :multi-match? #"INV #"} + {:vendor "Fresh and Best Produce" :keywords [#"freshbestproduce"] :extract {:date #"\n\s+([0-9]+/[0-9]+/[0-9]+)"