diff --git a/src/clj/auto_ap/parse.clj b/src/clj/auto_ap/parse.clj index 4a2ca084..c09fb54e 100644 --- a/src/clj/auto_ap/parse.clj +++ b/src/clj/auto_ap/parse.clj @@ -91,7 +91,7 @@ (sort-by second) ffirst) - word-set (set (str/split (.toLowerCase invoice-client-name) #"[\s:]" )) + word-set (set (filter (complement str/blank?) (str/split (.toLowerCase invoice-client-name) #"[\s:\-]" ))) client-word-match (->> clients (map (fn [{:keys [:db/id :client/matches :client/name] :as client :or {matches []}}] diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 2670d6d4..f9f5ea7d 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -105,6 +105,17 @@ :parser {:date [:clj-time "EEE MMM dd, yyyy HH:mm aa"] :total [:trim-commas nil]}} + ;; Del Monte Meats + {:vendor "Del Monte Meat Co" + :keywords [#"Del Monte"] + :extract {:date #"([0-9]+/[0-9]+/[0-9]+)" + :customer-identifier #"Bill To:(?:.*?(?=\s{2,}))(.*)-" + :invoice-number #"Invoice\s+([0-9]+)" + :total #"\$([0-9\.,]+)"} + :parser {:date [:clj-time "MM/dd/yyyy"] + :total [:trim-commas nil]} + :multi #"\n" + :multi-match? #"^ [0-9]+"} ;; Young's Market Co new statement {:vendor "Youngs Market"