temporarily loading 30 days of data
This commit is contained in:
@@ -388,7 +388,7 @@
|
||||
|
||||
(defn daily-results
|
||||
([client location]
|
||||
(daily-results client location (time/plus (time/now) (time/days -7)) (time/now)))
|
||||
(daily-results client location (time/plus (time/now) (time/days -30)) (time/now)))
|
||||
([client location start end]
|
||||
(capture-context->lc
|
||||
(->
|
||||
@@ -458,7 +458,7 @@
|
||||
(:payout_entries result)))))))
|
||||
|
||||
(defn payouts
|
||||
([client location] (payouts client location (time/plus (time/now) (time/days -7)) (time/now)))
|
||||
([client location] (payouts client location (time/plus (time/now) (time/days -30)) (time/now)))
|
||||
([client location start end]
|
||||
(with-context-as {:location (:square-location/client-location location)} lc
|
||||
(de/chain (manifold-api-call
|
||||
@@ -599,7 +599,7 @@
|
||||
(apply de/zip
|
||||
(for [square-location (:client/square-locations client)
|
||||
:when (:square-location/client-location square-location)]
|
||||
(upsert client square-location (time/plus (time/now) (time/days -14)) (time/now)))))
|
||||
(upsert client square-location (time/plus (time/now) (time/days -30)) (time/now)))))
|
||||
([client location start end]
|
||||
(capture-context->lc
|
||||
(de/chain (daily-results client location start end)
|
||||
@@ -618,7 +618,7 @@
|
||||
:when (:square-location/client-location square-location)]
|
||||
(upsert-payouts client square-location))))
|
||||
([client location]
|
||||
(upsert-payouts client location (time/plus (time/now) (time/days -7)) (time/now)))
|
||||
(upsert-payouts client location (time/plus (time/now) (time/days -30)) (time/now)))
|
||||
([client location start end]
|
||||
(with-context-as {:source "Square payout loading"
|
||||
:client (:client/code client)} lc
|
||||
@@ -825,7 +825,7 @@
|
||||
(apply de/zip
|
||||
(for [square-location (:client/square-locations client)
|
||||
:when (:square-location/client-location square-location)]
|
||||
(remove-voided-orders client square-location (time/plus (time/now) (time/days -14)) (time/now)))))
|
||||
(remove-voided-orders client square-location (time/plus (time/now) (time/days -30)) (time/now)))))
|
||||
([client location start end]
|
||||
(let [start (max-date start (coerce/to-date-time #inst "2024-04-15T00:00:00-08:00"))]
|
||||
(capture-context->lc
|
||||
|
||||
Reference in New Issue
Block a user