south bay produce.
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
(let [clients (d-clients/get-all)
|
||||
_ (println imports)
|
||||
|
||||
transactions (reduce (fn [result {:keys [invoice-number customer-identifier total date vendor-code text] :as info}]
|
||||
transactions (reduce (fn [result {:keys [invoice-number customer-identifier total date vendor-code text full-text] :as info}]
|
||||
(println "searching for" vendor-code)
|
||||
(let [[matching-vendor default-expense-account] (->> (d/query
|
||||
{:query {:find ['?vendor '?default-expense-account]
|
||||
@@ -175,7 +175,7 @@
|
||||
_ (println matching-vendor)
|
||||
matching-client (parse/best-match clients customer-identifier)
|
||||
_ (println "New invoice matches client" matching-client)
|
||||
matching-location (parse/best-location-match matching-client text )
|
||||
matching-location (parse/best-location-match matching-client text full-text)
|
||||
[existing-id existing-outstanding-balance existing-status import-status] (when (and matching-client matching-location)
|
||||
(->> (d/query
|
||||
(cond-> {:query {:find ['?e '?outstanding-balance '?status '?import-status2]
|
||||
|
||||
Reference in New Issue
Block a user