From 269fa45923b37bad9169a42e1f8622117cc4791c Mon Sep 17 00:00:00 2001 From: Bryce Date: Thu, 4 Dec 2025 11:18:36 -0800 Subject: [PATCH] improvements --- src/clj/auto_ap/parse.clj | 6 +++++- src/clj/auto_ap/parse/templates.clj | 4 ++-- src/clj/auto_ap/ssr/invoices.clj | 2 +- src/clj/user.clj | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/clj/auto_ap/parse.clj b/src/clj/auto_ap/parse.clj index 5d592c90..a79db964 100644 --- a/src/clj/auto_ap/parse.clj +++ b/src/clj/auto_ap/parse.clj @@ -208,4 +208,8 @@ (println v) (map (fn [x] (dissoc x :full-text :text)) - (parse v))) \ No newline at end of file + (parse v))) + +#_(nth (re-find #"ELECTRONICALLY.*\n\s*(.*?)\s{2,}" @last-text) + + 1) diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index 9349b583..06d1d474 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -746,9 +746,9 @@ :multi #"\n" :multi-match? #"INV #"} {:vendor "Paulino's Bakery" - :keywords [#"Paulino's Bakery" #"Statement"] + :keywords [#"paulinosbakery"] :extract {:date #"\s*([0-9]+/[0-9]+/[0-9]+)" - :customer-identifier #"To:\s*\n\s+(.*?)\s{2,}" + :customer-identifier #"831-333-1010\s*\n\s+(.*?)\s{2,}" :invoice-number #"INV #(\d+)" :total #"INV #(?:.*?)\s{2,}([\d\-,]+\.\d{2,2}+)"} :parser {:date [:clj-time "MM/dd/yyyy"] diff --git a/src/clj/auto_ap/ssr/invoices.clj b/src/clj/auto_ap/ssr/invoices.clj index 735d0ddb..92b95c15 100644 --- a/src/clj/auto_ap/ssr/invoices.clj +++ b/src/clj/auto_ap/ssr/invoices.clj @@ -1369,7 +1369,7 @@ :payment-type/credit :else :payment-type/debit) identity - (:handwritten-date snapshot)) + (:handwritten-date snapshot)) (catch Exception e (println e))))))] (modal-response diff --git a/src/clj/user.clj b/src/clj/user.clj index 46d8004f..8a88dc44 100644 --- a/src/clj/user.clj +++ b/src/clj/user.clj @@ -329,7 +329,7 @@ #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn tx-detail [i] - (map (juxt :e #(pull-attr (dc/db conn) :db/ident (:a %)) :v) + (map (juxt :e #(pull-attr (dc/db conn) :db/ident (:a %)) :v :added) (:data (first (dc/tx-range (dc/log conn) i