diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 5ce3fc1e..bf0d273a 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -64,13 +64,20 @@ :customer-identifier #"DELIVER TO[^\n]+\n\s*[\S ]+?(?=\s{2,}([\S ]+?)\s{2,})" ;; ([\S ]+)\s{2,} :invoice-number #"DELIVER TO[^\n]+\n.+?(?=\d+)(\d+)\s*\n" :total #"([0-9.]+)\s+Status Code"} - :parser {#_#_:date [:clj-time "MM/dd/yy"]}} + :parser {:date [:clj-time "MM/dd/yy"]}} {:vendor "US Foods" :keywords [#"US Foods"] :extract {:date #"INVOICE NUMBER[^\n]+\n\n\d+\s+\d+\s+([0-9]+/[0-9]+/[0-9]+)" :customer-identifier #"BILL TO[^\n]+\n([\S ]+?)(?=\s{2,})" ;; ([\S ]+)\s{2,} :invoice-number #"INVOICE NUMBER[^\n]+\n\n\d+\s+(\d+)" :total #"DELIVERED AMOUNT\s+\$([0-9.]+)"} + :parser {:date [:clj-time "MM/dd/yyyy"]}} + {:vendor "Sysco" + :keywords [#"SYSCO"] + :extract {:date #"INVOICE NUMBER[^\n]+\n([^\n]+)\n" + :customer-identifier #"INVOICE NUMBER[^\n]+\n[^\n]+\n([\S ]+?)(?=\s{2,})" ;; ([\S ]+)\s{2,} + :invoice-number #"INVOICE NUMBER[^\n]+\n[^\n]+\n.*?(?=[\d]{9})(\d{9})" + :total #"\s{2,}INVOICE\s{2,}.*?(?=TOTAL)TOTAL\s+([0-9.]+)"} :parser {:date [:clj-time "MM/dd/yyyy"]}}]) (def excel-templates