Turns on invoice importation
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
(defmethod extract-invoice-details :general-produce
|
||||
[k input-stream clients]
|
||||
(log/info ::parsing-general-produce :key k)
|
||||
(try
|
||||
(->> (read-csv input-stream)
|
||||
(drop 1)
|
||||
(filter (fn [[_ _ _ _ _ _ _ _ _ _ _ break-flag]]
|
||||
@@ -86,7 +87,12 @@
|
||||
:invoice/status :invoice-status/unpaid
|
||||
:invoice/client-identifier location-hint
|
||||
})))
|
||||
(filter :invoice/client)))
|
||||
(filter :invoice/client)
|
||||
(into []))
|
||||
(catch Exception e
|
||||
(log/error ::cant-import-general-produce
|
||||
:error e)
|
||||
[])))
|
||||
|
||||
(defmethod extract-invoice-details :unknown
|
||||
[k input-stream clients]
|
||||
@@ -230,7 +236,6 @@
|
||||
(with-open [is (-> (s3/get-object {:bucket-name bucket-name
|
||||
:key k})
|
||||
:input-stream)]
|
||||
(doto
|
||||
(->> (extract-invoice-details k
|
||||
is
|
||||
clients)
|
||||
@@ -239,8 +244,7 @@
|
||||
:invoice i)
|
||||
i))
|
||||
(mapv (fn [i]
|
||||
[:propose-invoice (assoc i :invoice/source-url invoice-url)])))
|
||||
println)))
|
||||
[:propose-invoice (assoc i :invoice/source-url invoice-url)])))))
|
||||
(catch Exception e
|
||||
(log/error ::cant-load-file
|
||||
:key k
|
||||
|
||||
Reference in New Issue
Block a user