fix sysco.

This commit is contained in:
Bryce Covert
2022-01-03 19:36:02 -08:00
parent d38f8d8020
commit a982864810

View File

@@ -70,6 +70,7 @@
(and customer-identifier
(parse/best-match clients customer-identifier)))
total (Double/parseDouble (summary-row "TotalExtendedPrice"))
tax (Double/parseDouble (summary-row "TotalTaxAmount"))
date (t/parse
(header-row "InvoiceDate")
"yyMMdd")
@@ -79,7 +80,7 @@
(log/infof "Importing %s for %s" (header-row "InvoiceNumber") (header-row "CustomerName"))
[:propose-invoice (cond-> #:invoice {:invoice-number (header-row "InvoiceNumber")
:total total
:total (+ total tax)
:outstanding-balance total
:date (coerce/to-date date)
:vendor (:db/id sysco-vendor )