Supports forcing vendor

This commit is contained in:
Bryce Covert
2020-05-11 19:21:48 -07:00
parent 8f66aac170
commit 55960888cf
5 changed files with 118 additions and 25 deletions

View File

@@ -173,7 +173,7 @@
;; WINE WAREHOUSE
{:vendor "Wine Warehouse"
:keywords [#"WINE WAREHOUSE"]
:keywords [#"WINE WAREHOUSE" #"Bottle prices include"]
:extract {:date #"INVOICE DATE\s+([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"SHIP-TO-PARTY.*\n(.*?)(?=\s{2,})"
:invoice-number #"INV #\s+(\d+)"
@@ -181,6 +181,26 @@
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas nil]}}
;; WINE WAREHOUSE 3
{:vendor "Wine Warehouse"
:keywords [#"Wine Warehouse" #"PLEASE APPLY CREDIT"]
:extract {:date #"Credit Memo Number/Date\s+\d+\s+([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"Ship-To-Party.*\n(.*?)\s{2,}"
:invoice-number #"Credit Memo Number/Date\s+(\d+)"
:total #"Total\s+([0-9]+\.[0-9]{2}-)"}
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas-and-negate nil]}}
;; WINE WAREHOUSE 2
{:vendor "Wine Warehouse"
:keywords [#"WINE WAREHOUSE" #"Bill-to-Party"]
:extract {:date #"Invoice date\s+([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"Bill-to-Party.*\n(.*?)\s{2,}"
:invoice-number #"Invoice number\s+(\d+)"
:total #"Gross\s+([0-9]+\.[0-9]{2})"}
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas nil]}}
;; REGAL
{:vendor "Regal Wine Co"
:keywords [#"REGAL WINE"]
@@ -295,6 +315,16 @@
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas-and-negate nil]}}
;; Ocean Queen
{:vendor "Ocean Queen"
:keywords [#"Ocean Queen USA"]
:extract {:date #"([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"Bill To.*\n\s*(.*?)\s{2,}"
:invoice-number #"Invoice #\n.*\n.*?(\d+)\n"
:total #"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)"]