imports invoices one at a time to avoid duplicating them

This commit is contained in:
Bryce
2023-05-30 12:30:58 -07:00
parent c020fa2818
commit 534b6e35f2
3 changed files with 8 additions and 4 deletions

View File

@@ -136,8 +136,8 @@
(defn import->invoice [{:keys [invoice-number source-url customer-identifier account-number total date vendor-code text full-text client-override vendor-override location-override import-status]}]
(let [matching-client (cond
account-number (d-clients/exact-match account-number)
customer-identifier (d-clients/best-match customer-identifier)
account-number (:db/id (d-clients/exact-match account-number))
customer-identifier (:db/id (d-clients/best-match customer-identifier))
client-override (Long/parseLong client-override))
matching-vendor (match-vendor vendor-code vendor-override)