Minor fixes.
This commit is contained in:
@@ -66,10 +66,12 @@
|
||||
(header-row "City1")
|
||||
(header-row "City2")])
|
||||
|
||||
matching-client (or (and account-number
|
||||
(parse/best-match clients account-number 0.0))
|
||||
(and customer-identifier
|
||||
(parse/best-match clients customer-identifier)))
|
||||
matching-client (and account-number
|
||||
(parse/best-match clients account-number 0.0))
|
||||
_ (when-not matching-client
|
||||
(throw (ex-info "cannot find matching client"
|
||||
{:account-number account-number
|
||||
:name customer-identifier})))
|
||||
total (Double/parseDouble (summary-row "TotalExtendedPrice"))
|
||||
tax (Double/parseDouble (summary-row "TotalTaxAmount"))
|
||||
date (t/parse
|
||||
@@ -133,10 +135,13 @@
|
||||
(log/infof "Found %d sysco invoice to import: %s" (count keys) (pr-str keys))
|
||||
|
||||
(let [result @(d/transact conn (mapv (fn [k]
|
||||
(-> k
|
||||
read-sysco-csv
|
||||
(extract-invoice-details clients sysco-vendor)
|
||||
))
|
||||
(try
|
||||
(-> k
|
||||
read-sysco-csv
|
||||
(extract-invoice-details clients sysco-vendor))
|
||||
(catch Exception e
|
||||
(log/error e)
|
||||
[])))
|
||||
keys))]
|
||||
(log/infof "Imported %d invoices" (/ (count (:tempids result)) 2)))
|
||||
(doseq [k keys]
|
||||
|
||||
Reference in New Issue
Block a user