Highlights plaid errors more clearly
This commit is contained in:
@@ -753,3 +753,75 @@
|
||||
(assoc :dirty-entries (auto-ap.ledger/get-dirty-entries account-needing-rebuild db))
|
||||
(assoc :account-type (:account_type ((auto-ap.ledger/build-account-lookup (:client account-needing-rebuild)) (:account account-needing-rebuild))))
|
||||
(auto-ap.ledger/compute-running-balance))])
|
||||
|
||||
|
||||
(seq
|
||||
(datomic.api/q (quote
|
||||
[:find ?code ?name ?bn ?bac ?bt2 ?d2 ?bas
|
||||
:in $ ?start ?end ?group
|
||||
:where
|
||||
(or
|
||||
[?c :client/groups ?group]
|
||||
[?c :client/code ?group])
|
||||
[?c :client/name ?name]
|
||||
[?c :client/code ?code]
|
||||
[?c :client/bank-accounts ?b]
|
||||
[?b :bank-account/name ?bn]
|
||||
[?b :bank-account/type ?bat]
|
||||
[?b :bank-account/code ?bac]
|
||||
[?bat :db/ident ?bt]
|
||||
[(name ?bt) ?bt2]
|
||||
[(vector ?c) ?c2]
|
||||
(or-join [?b ?bas]
|
||||
(and [?b :bank-account/plaid-account]
|
||||
[(ground "plaid") ?bas])
|
||||
(and [?b :bank-account/intuit-bank-account]
|
||||
[(ground "intuit") ?bas])
|
||||
(and [?b :bank-account/yodlee-account]
|
||||
[(ground "yodlee") ?bas])
|
||||
(and (not [?b :bank-account/yodlee-account])
|
||||
(not [?b :bank-account/intuit-bank-account])
|
||||
(not [?b :bank-account/plaid-account])
|
||||
[(ground "none") ?bas]))
|
||||
[(datomic.api/q (quote [:find ?b (max ?d)
|
||||
:in $ ?c2 ?start ?end
|
||||
:where [(iol-ion.query/scan-transactions $ ?c2 ?start ?end) [[?t _ _] ...]]
|
||||
[?t :transaction/date ?d]
|
||||
[?t :transaction/bank-account ?b]])
|
||||
$ ?c2 ?start ?end)
|
||||
[[?b ?d] ...]]
|
||||
[(iol-ion.query/excel-date ?d) ?d2]])
|
||||
(dc/db conn)
|
||||
#inst "2024-09-01"
|
||||
#inst "2024-09-30"
|
||||
"NTG"))
|
||||
|
||||
(user/init-repl)
|
||||
|
||||
|
||||
(seq
|
||||
(datomic.api/q (quote
|
||||
[:find ?code ?name ?bn ?bac ?bt2 ?as3 (count ?t)
|
||||
:in $ ?start ?end ?group
|
||||
:where
|
||||
(or
|
||||
[?c :client/groups ?group]
|
||||
[?c :client/code ?group])
|
||||
[?c :client/name ?name]
|
||||
[?c :client/code ?code]
|
||||
[?c :client/bank-accounts ?b]
|
||||
[?b :bank-account/name ?bn]
|
||||
[?b :bank-account/type ?bat]
|
||||
[?b :bank-account/code ?bac]
|
||||
[?bat :db/ident ?bt]
|
||||
[(name ?bt) ?bt2]
|
||||
[(vector ?c) ?c2]
|
||||
[(iol-ion.query/scan-transactions $ ?c2 ?start ?end) [[?t _ _] ...]]
|
||||
[?t :transaction/approval-status ?as]
|
||||
[?as :db/ident ?as2]
|
||||
[(name ?as2) ?as3]
|
||||
])
|
||||
(dc/db conn)
|
||||
#inst "2024-09-01"
|
||||
#inst "2024-09-30"
|
||||
"NTG"))
|
||||
|
||||
Reference in New Issue
Block a user