got integration tests more or less working
This commit is contained in:
@@ -303,8 +303,8 @@
|
||||
:db/doc "Whether to include this bank account in balance sheet, etc."
|
||||
:db/valueType :db.type/boolean
|
||||
:db/cardinality :db.cardinality/one}]]
|
||||
:depends-on [:auto-ap/add-manager-schema]}
|
||||
:auto-ap/migrate-include-in-reports {:txes-fn `add-include-in-reports :depends-on [:auto-ap/add-include-in-reports1] }
|
||||
:requires [:auto-ap/add-manager-schema]}
|
||||
:auto-ap/migrate-include-in-reports {:txes-fn `add-include-in-reports :requires [:auto-ap/add-include-in-reports1] }
|
||||
:auto-ap/add-forecasted-transaction-match {:txes [[{:db/ident :transaction/forecast-match
|
||||
:db/doc "Which forecast this transaction matches, for cashflow"
|
||||
:db/valueType :db.type/ref
|
||||
@@ -356,13 +356,14 @@
|
||||
:db/cardinality :db.cardinality/one}]]}
|
||||
:auto-ap/add-power-user-schema {:txes [[{:db/ident :user-role/power-user}]]}
|
||||
:auto-ap/add-transaction-date-index {:txes [[{:db/ident :transaction/date
|
||||
:db/index true}]]}
|
||||
:db/index true}]]
|
||||
:requires [:auto-ap/add-general-ledger6]}
|
||||
:auto-ap/add-invoice-index {:txes [[{:db/ident :invoice/invoice-number
|
||||
:db/index true}]]
|
||||
:depends-on [:auto-ap/base-schema]}
|
||||
:requires [:auto-ap/base-schema]}
|
||||
|
||||
:auto-ap/add-propose-invoice {:txes-fn `propose-invoice-fn
|
||||
:depends-on [:auto-ap/base-schema]}
|
||||
:requires [:auto-ap/base-schema]}
|
||||
:auto-ap/add-intuit-banks-4 {:txes [[{:db/ident :intuit-bank-account/external-id
|
||||
:db/doc "Id of the intui bank"
|
||||
:db/valueType :db.type/string
|
||||
@@ -381,7 +382,7 @@
|
||||
:db/doc "An unhashed version of the id"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]
|
||||
:depends-on [:auto-ap/base-schema]}
|
||||
:requires [:auto-ap/add-general-ledger6]}
|
||||
:auto-ap/add-transaction-import2 {:txes [[{:db/ident :import-batch/external-id
|
||||
:db/doc "An identifier for the import batch"
|
||||
:db/valueType :db.type/string
|
||||
@@ -425,11 +426,11 @@
|
||||
:db/doc "Who triggred this import"
|
||||
:db/valueType :db.type/string
|
||||
:db/cardinality :db.cardinality/one}]]
|
||||
:depends-on [:auto-ap/base-schema]}
|
||||
:requires [:auto-ap/add-general-ledger6]}
|
||||
:auto-ap/add-suppression {:txes [[{:db/ident :transaction-approval-status/suppressed}
|
||||
{:db/ident :transaction/approval-status
|
||||
:db/index true}]]
|
||||
:depends-on [:auto-ap/base-schema]}}
|
||||
:requires [:auto-ap/add-transaction-rules]}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(:require
|
||||
[auto-ap.datomic
|
||||
:refer [add-sorter-fields apply-pagination apply-sort-3 conn merge-query]]
|
||||
[auto-ap.graphql.utils :refer [assert-admin assert-present]]
|
||||
[auto-ap.graphql.utils :refer [assert-admin assert-present <-graphql ->graphql]]
|
||||
[auto-ap.plaid.core :as p]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as time]
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
start (time/plus end (time/days -30))
|
||||
_ (log/infof "importing from %s to %s for %s" start end external-id)
|
||||
transactions (p/get-transactions access-token external-id start end)
|
||||
_ (clojure.pprint/pprint transactions)
|
||||
transactions (->> transactions
|
||||
:transactions
|
||||
(filter (fn [t]
|
||||
|
||||
Reference in New Issue
Block a user