south bay produce.

This commit is contained in:
Bryce Covert
2019-10-24 20:16:28 -07:00
parent 84e202bab9
commit aa90c1b4c1
4 changed files with 44 additions and 21 deletions

View File

@@ -26,7 +26,7 @@
(map (fn [[_ po-number despatch-number invoice-number invoice-date customer value :as row]]
{:vendor-code "Mama Lu's Foods"
:customer-identifier customer
:invoice-number (str invoice-number " " po-number)
:invoice-number (str po-number "-" invoice-number )
:date (u/parse-value :clj-time "MM/dd/yy HH:ss" invoice-date)
:total value
:text (str/join " " row)})))

View File

@@ -48,7 +48,16 @@
:customer-identifier #"Bill To:[^\n]+\n\s*([\w ]+)"
:invoice-number #"Invoice\s([\w\./]+)*"
:total #"Total Invoice\s+([0-9.]+)"}
:parser {:date [:clj-time "MM/dd/yy"]}}])
:parser {:date [:clj-time "MM/dd/yy"]}}
{:vendor "Southbay Fresh Produce"
:keywords [#"SOUTH BAY FRESH PRODUCE"]
:extract {:date #"^([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"FAX:[^\n]+\n\s+([A-Za-z ]+)\s{2}"
:invoice-number #"^[0-9]+/[0-9]+/[0-9]+\s+(\d+)"
:total #"\$([0-9.]+)"}
:parser {:date [:clj-time "MM/dd/yyyy"]}
:multi #"\n"
:multi-match? #"^[0-9]+/[0-9]+/[0-9]+\s+(\d+)"}])
(def excel-templates
[{:vendor "Isp Productions"