fixed one invoice type and added another.

This commit is contained in:
Bryce Covert
2019-12-31 18:18:31 -08:00
parent 7bc9d43457
commit 2913f05479

View File

@@ -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)"]