minor bugfix.

This commit is contained in:
Bryce Covert
2022-05-08 16:16:38 -07:00
parent 4b4246fafa
commit 8f47b4bb2b
2 changed files with 8 additions and 10 deletions

View File

@@ -1,20 +1,20 @@
(ns auto-ap.square.core
(:require [auto-ap.datomic :refer [conn remove-nils]]
[auto-ap.time :as atime]
[auto-ap.utils :refer [allow-once]]
[clj-http.client :as client]
[clj-time.coerce :as coerce]
[clj-time.core :as time]
[clj-time.periodic :as periodic]
[clj-time.format :as f]
[clojure.string :as str]
[clj-time.periodic :as periodic]
[clojure.core.async :as async]
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.tools.logging :as log]
[datomic.api :as d]
[mount.core :as mount]
[unilog.context :as lc]
#_{:clj-kondo/ignore [:unused-namespace]}
[yang.scheduler :as scheduler]
[clojure.core.async :as async]))
[yang.scheduler :as scheduler]))
(defn client-base-headers [client]
{"Square-Version" "2021-08-18"
@@ -481,12 +481,9 @@
(log/info "Loading refunds")
(upsert-refunds client))))
(def upsert-all (allow-once upsert-all))
(mount/defstate square-loader
:start (scheduler/every (* 4 59 60 1000) upsert-all)
:stop (scheduler/stop square-loader))

View File

@@ -432,6 +432,7 @@
:field [:accounts]
:max (Math/abs (js/parseFloat (:amount data)))
:descriptor "credit account"
:client (:client data)
:disabled (or (boolean (:payment data))
should-disable-for-client?)
:locations locations}])