Merge branch 'master' into get-transactions2-page-working

This commit is contained in:
2026-01-27 16:26:50 -08:00
4 changed files with 40 additions and 11 deletions

View File

@@ -249,7 +249,7 @@
(if start
(>= (.compareTo ^java.util.Date d start) 0)
true)
(< (.compareTo ^java.util.Date d end) 0)))))
(<= (.compareTo ^java.util.Date d end) 0)))))
(reduce
(fn step [acc ^Line l]
(assoc! acc

View File

@@ -32,6 +32,9 @@
(str/includes? (str header) "Due Date")
:ledyard
(str/includes? (str header) "PARENT CUSTOMER NAME")
:worldwide
:else
nil)]
@@ -185,6 +188,23 @@
[]
(drop 1 rows)))
(defmethod parse-csv :worldwide
[rows]
(transduce
(comp
(map (fn [[_ customer-name _ inv date amount :as row]]
{:vendor-code "Worldwide Produce"
:customer-identifier customer-name
:invoice-number (str/replace inv #"[=\"]" "")
:date (some-> date not-empty (parse-date-fallover ["MM/dd/yy"]))
:total (str/replace amount #"[\$,]" "")
:text (str/join " " row)
:full-text (str/join " " row)}))
)
conj
[]
(drop 1 rows)))
#_{:clj-kondo/ignore [:unused-binding]}
(defmethod parse-csv nil
[rows]

View File

@@ -736,15 +736,15 @@
:parser {:date [:clj-time "MM/dd/yyyy"]
:total [:trim-commas-and-negate nil]}}
{:vendor "Reel Produce"
:keywords [#"reelproduce.com" #"Statem"]
:extract {:date #"\s*([0-9]+/[0-9]+/[0-9]+)"
:customer-identifier #"ELECTRONICALLY.*\n\s*(.*?)\s{2,}"
:invoice-number #"#(\d+)"
:keywords [#"Reel Produce" #"Statem"]
:extract {:date #"\s*([0-9]+\-[0-9]+\-[0-9]+)"
:customer-identifier #"Customer.*\n(.*?)\n"
:invoice-number #"^(\d+)"
:total #"([\d\-,]+\.\d{2,2})"}
:parser {:date [:clj-time "MM/dd/yyyy"]
:parser {:date [:clj-time "yyyy-MM-dd"]
:total [:trim-commas-and-negate nil]}
:multi #"\n"
:multi-match? #"INV #"}
:multi-match? #"^\d+"}
{:vendor "Paulino's Bakery"
:keywords [#"paulinosbakery"]
:extract {:date #"\s*([0-9]+/[0-9]+/[0-9]+)"

View File

@@ -35,6 +35,7 @@
:address/city
:address/state
:address/zip]}
{:vendor/default-account [:account/name]}
:vendor/legal-entity-tin
:vendor/legal-entity-name
:vendor/legal-entity-first-name
@@ -49,8 +50,8 @@
:where
[?p :payment/client ?c]
[?p :payment/date ?d ]
[(>= ?d #inst "2024-01-01T08:00")]
[(< ?d #inst "2025-01-01T08:00")]
[(>= ?d #inst "2025-01-01T08:00")]
[(< ?d #inst "2026-01-01T08:00")]
[?p :payment/type :payment-type/check]
[?p :payment/amount ?a]
[?p :payment/vendor ?v]]
@@ -68,8 +69,8 @@
:where
[?p :payment/client ?c]
[?p :payment/date ?d ]
[(>= ?d #inst "2024-01-01T08:00")]
[(< ?d #inst "2025-01-01T08:00")]
[(>= ?d #inst "2025-01-01T08:00")]
[(< ?d #inst "2026-01-01T08:00")]
[?p :payment/type :payment-type/check]
[?p :payment/amount ?a]
[?p :payment/vendor ?v]]
@@ -144,6 +145,14 @@
:color :yellow}
(name tin-type)))]
)}
{:key "expense-account"
:name "Expense Account"
:show-starting "md"
:render (fn [[_ vendor]]
[:div.flex.gap-4
(when-let [tin (-> vendor :vendor/default-account :account/name)]
[:span {:class "text-xs font-medium py-0.5 "}
tin]) ])}
{:key "address"
:name "Address"
:sort-key "address"