minor cleanup. no errors anymore.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
[clojure.data.csv :as csv]
|
||||
[clj-time.coerce :as c]
|
||||
[clj-time.core :as t]
|
||||
[clj-time.periodic :as per]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.string :as str]
|
||||
|
||||
@@ -485,11 +486,11 @@
|
||||
|
||||
(println "orders")
|
||||
(lc/with-context {:source "Historical loading data"}
|
||||
(doseq [d (clj-time.periodic/periodic-seq (t/plus (t/today) (t/days (- days)))
|
||||
(doseq [d (per/periodic-seq (t/plus (t/today) (t/days (- days)))
|
||||
(t/today)
|
||||
(t/days 1))]
|
||||
(println d)
|
||||
(square/upsert client square-location d)))
|
||||
(square/upsert client square-location d (t/plus d t/days 1))))
|
||||
|
||||
(println "refunds")
|
||||
(square/upsert-refunds client square-location)
|
||||
@@ -497,7 +498,7 @@
|
||||
|
||||
(println "settlements")
|
||||
(with-redefs [square/lookup-dates (fn lookup-dates []
|
||||
(->> (clj-time.periodic/periodic-seq (t/plus (t/today) (t/days (- days)))
|
||||
(->> (per/periodic-seq (t/plus (t/today) (t/days (- days)))
|
||||
(t/today)
|
||||
(t/days 2))
|
||||
(map (fn [d]
|
||||
@@ -517,7 +518,8 @@
|
||||
|
||||
(println "orders")
|
||||
(lc/with-context {:source "Historical loading data"}
|
||||
(square/upsert client square-location (c/to-date-time date)))))
|
||||
(square/upsert client square-location (c/to-date-time date)
|
||||
(t/plus (c/to-date-time date) (t/days 1))))))
|
||||
|
||||
(defn upsert-invoice-amounts [tsv]
|
||||
(let [data (with-open [reader (io/reader (char-array tsv))]
|
||||
|
||||
Reference in New Issue
Block a user