various fixes.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
(defn raw-graphql-ids [db args]
|
||||
(->> (doto (cond-> {:query {:find []
|
||||
:in ['$]
|
||||
:where []}
|
||||
:where ['[?e :invoice/client]]}
|
||||
:args [(d/db (d/connect uri))]}
|
||||
|
||||
(limited-clients (:id args))
|
||||
@@ -105,6 +105,14 @@
|
||||
'[(.contains ^String ?invoice-number ?invoice-number-like)]]}
|
||||
:args [(:invoice-number-like args)]})
|
||||
|
||||
(:unresolved args)
|
||||
(merge-query {:query {:in []
|
||||
:where ['(or-join [?e]
|
||||
(not [?e :invoice/expense-accounts ])
|
||||
(and [?e :invoice/expense-accounts ?ea]
|
||||
(not [?ea :invoice-expense-account/account])))]}
|
||||
:args []})
|
||||
|
||||
(seq (:location args))
|
||||
(merge-query {:query {:in ['?location]
|
||||
:where ['[?e :invoice/expense-accounts ?eas]
|
||||
|
||||
@@ -481,6 +481,7 @@
|
||||
:date_range {:type :date_range}
|
||||
:due_range {:type :date_range}
|
||||
:status {:type :invoice_status}
|
||||
:unresolved {:type 'Boolean}
|
||||
:client_id {:type :id}
|
||||
:vendor_id {:type :id}
|
||||
:amount_lte {:type :money}
|
||||
|
||||
@@ -308,9 +308,10 @@
|
||||
|
||||
:journal-entry/line-items
|
||||
(mapv (fn [ea]
|
||||
(when-not (get
|
||||
(get all-client-locations (:client_code entry))
|
||||
(:location ea))
|
||||
(when (and (not (get
|
||||
(get all-client-locations (:client_code entry))
|
||||
(:location ea)))
|
||||
(not= "A" (:location ea)))
|
||||
(throw (ex-info (str "Location '" (:location ea) "' not found.")
|
||||
{:status :error})))
|
||||
(when (and (<= (:debit ea 0.0) 0.0)
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
|
||||
|
||||
(when (seq repairs)
|
||||
(log/info (take 3 repairs))
|
||||
(log/warn "repairing " (count txes-missing-ledger-entries) " missing transactions, " (count invoices-missing-ledger-entries) " missing invoices that were missing ledger entries")
|
||||
|
||||
|
||||
|
||||
@@ -361,12 +361,13 @@
|
||||
user-session (login-user cob-session)
|
||||
batch-size 100]
|
||||
|
||||
(-> (str (:yodlee-base-url env) "/providerAccounts?providerAccountIds=" pa)
|
||||
(doto (-> (str (:yodlee-base-url env) "/providerAccounts?providerAccountIds=" pa)
|
||||
|
||||
(client/put (merge {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)})
|
||||
:body (json/write-str data)
|
||||
:as :json}
|
||||
other-config)))
|
||||
(client/put (merge {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)})
|
||||
:body (json/write-str data)
|
||||
:as :json}
|
||||
other-config)))
|
||||
log/info)
|
||||
(refresh-provider-account pa)))
|
||||
|
||||
#_(defn get-users []
|
||||
|
||||
Reference in New Issue
Block a user