diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 07087551..a0bba1a6 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -100,7 +100,7 @@ :extract {:date #"0430\n(.*)" :customer-identifier #"Account:(?:.*\n)(.*(?=\s{2,}))" :invoice-number #"Invoice#: (\d+)" - :total #"Invoice Total\s+([0-9]+\.[0-9]{2})"} + :total #"Invoice Total\s+([0-9,]+\.[0-9]{2})"} :parser {:date [:clj-time "EEE MMM dd, yyyy HH:mm aa"] :total [:trim-commas nil]}} @@ -197,6 +197,16 @@ :multi #"\n" :multi-match? #"^\s+[0-9]+/[0-9]+/[0-9]+\s+\d+\s+(INV|C/M)\s+"} + ;; A&B Invoice + {:vendor "A&B Produce" + :keywords [#"415-656-0254"] + :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]}} + ;; CHEF's CHOICE {:vendor "Chef's Choice Produce Co" :keywords [#"(2170 MARTIN AVENUE|213-3886)"]