makes signature show up and adds logging for why invoice might be imported wrong.
This commit is contained in:
@@ -579,13 +579,19 @@
|
||||
|
||||
(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
|
||||
client-override client-override
|
||||
account-number (:db/id (d-clients/exact-match account-number))
|
||||
customer-identifier (:db/id (d-clients/best-match customer-identifier)))
|
||||
|
||||
client-override client-override
|
||||
account-number (:db/id (d-clients/exact-match account-number))
|
||||
customer-identifier (:db/id (d-clients/best-match customer-identifier)))
|
||||
_ (alog/info ::client-matched
|
||||
:account-number account-number
|
||||
:customer-identifier customer-identifier
|
||||
:client-override client-override
|
||||
:matching (when matching-client
|
||||
(dc/pull (dc/db conn) [:client/name :client/code] matching-client)))
|
||||
|
||||
matching-vendor (match-vendor vendor-code vendor-override)
|
||||
matching-location (or (when-not (str/blank? location-override)
|
||||
location-override)
|
||||
location-override)
|
||||
(parse/best-location-match (dc/pull (dc/db conn)
|
||||
[{:client/location-matches [:location-match/location :location-match/matches]}
|
||||
:client/default-location
|
||||
|
||||
Reference in New Issue
Block a user