invoice fixups.

This commit is contained in:
2021-12-10 07:42:50 -08:00
parent 4a7215a74b
commit 35e7dda7af
4 changed files with 60 additions and 41 deletions

View File

@@ -166,7 +166,10 @@
:total #"Total\s+([0-9\.,]+)"
:account-number #"Customer No.\s+(.*?)\s{2}"}
:parser {:date [:clj-time "MM/dd/yy"]
:total [:trim-commas nil]}}
:total [:trim-commas nil]}
:multi (. java.util.regex.Pattern (compile (-> \formfeed str) java.util.regex.Pattern/CASE_INSENSITIVE))
:multi-match? #"Customer No\."
}
;; AUTO-CHLOR
{:vendor "Auto-Chlor"
@@ -211,6 +214,18 @@
:parser {:date [:clj-time "MM/dd/yy"]
:total [:trim-commas-and-negate nil]}}
;;; credits don't have the same format
{:vendor "General Produce Company"
:keywords [#"1330 NORTH B"]
:extract {:date #"DATE.*\n.*\n.*?([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"SPECIAL INSTRUCTIONS.*\n\s+(.*?)\s{2,}"
:invoice-number #"CREDIT NO.*\n.*\n.*?(\d{5,}?)\s+"
:account-number #"CUST NO.*\n.*\n\s+(\d+)"
:total #"TOTAL:\s+\|\s*(.*)"}
:parser {:date [:clj-time "MM/dd/yy"]
:total [:trim-commas-and-negate nil]}}
;; Young's Market Co new statement
{:vendor "Youngs Market"
:keywords [#"(YOUNG'S MARKET COMPANY|Young.*Statement)"]