From ae5d2a1b3233c07fb84f93c7d04b917247cdc8d5 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 11 Mar 2024 08:21:07 -0700 Subject: [PATCH 1/2] Updates to squares preferred limit of 1000 --- src/clj/auto_ap/square/core3.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clj/auto_ap/square/core3.clj b/src/clj/auto_ap/square/core3.clj index 0164a613..c23b7193 100644 --- a/src/clj/auto_ap/square/core3.clj +++ b/src/clj/auto_ap/square/core3.clj @@ -211,7 +211,7 @@ :method :post :headers (client-base-headers client) :body (json/write-str (cond-> {"location_ids" [(:square-location/square-id location)] - "limit" 10000 + "limit" 1000 "cursor" cursor} start (merge (pc start end)))) :as :json}) @@ -238,7 +238,7 @@ (de/chain (manifold-api-call {:url "https://connect.squareup.com/v2/orders/search" :method :post :headers (client-base-headers client) - :body (json/write-str (cond-> {"location_ids" [(:square-location/square-id location)] "limit" 10000} + :body (json/write-str (cond-> {"location_ids" [(:square-location/square-id location)] "limit" 1000} start (merge (pc start end)))) :as :json}) :body From e5e28a4459fe5b17c863df68c14b4ccf71e57ef5 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 11 Mar 2024 15:22:27 -0700 Subject: [PATCH 2/2] Primizie foods --- src/clj/auto_ap/parse.fiddle | 0 src/clj/auto_ap/parse/templates.clj | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 src/clj/auto_ap/parse.fiddle diff --git a/src/clj/auto_ap/parse.fiddle b/src/clj/auto_ap/parse.fiddle new file mode 100644 index 00000000..e69de29b diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index d7d3bf61..e5f3cb7b 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -572,6 +572,14 @@ :total #"(?:INVOICE|TOTAL|CREDIT)\s+([\d\.,\-]+\.[\d\-]+( CR)?)"} :parser {:date [:clj-time "MM/dd/yyyy"] :total [:trim-commas-and-negate nil]}} + {:vendor "Primizie Foods" + :keywords [#"primiziefoods.com"] + :extract {:date #"Invoice Date\s+([0-9]+/[0-9]+/[0-9]+)" + :customer-identifier #"BILL TO.*?\n(.*?)\s{2,}" + :invoice-number #"Invoice #\s+(.*?)\n" + :total #"BALANCE DUE\s+\$([\d\.,\-]+\.[\d\-])"} + :parser {:date [:clj-time "MM/dd/yyyy"] + :total [:trim-commas-and-negate nil]}} ;; ROMA BAKERY {:vendor "Roma Bakery Inc."