Highlights plaid errors more clearly

This commit is contained in:
2024-10-07 20:55:30 -07:00
parent cf81e3999c
commit 8234db5623
4 changed files with 237 additions and 59 deletions

View File

@@ -179,6 +179,7 @@
:when id]
[client-id account-id location date current-balance]))
(comment
#_(account-snapshot (dc/db auto-ap.datomic/conn)
(auto-ap.datomic/pull-id (dc/db auto-ap.datomic/conn)
[:client/code "NGOP"])
@@ -190,3 +191,32 @@
[(iol-ion.query/account-snapshot $ ?c #inst "2023-01-01") [?x ...]]
[(untuple ?x) [_ ?a ?l ?date ?balance]]]
(dc/db auto-ap.datomic/conn)))
#_(->> (seq (dc/q '[:find ?code ?name ?afc ?an ?l ?d2 ?balance ?end4
:in $ ?end ?group
:where
[(clj-time.coerce/to-date-time ?end) ?end2]
[(iol-ion.query/localize ?end2) ?end3]
[(clj-time.coerce/to-date ?end3) ?end4]
(or
[?c :client/groups ?group]
[?c :client/code ?group])
[?c :client/name ?name]
[?c :client/code ?code]
[?c :client/bank-accounts ?b]
[(iol-ion.query/account-snapshot $ ?c ?end4) [?x ...]]
[(untuple ?x) [_ ?a ?l ?date ?balance]]
[(iol-ion.query/excel-date ?date) ?d2]
[(not= nil ?a)]
(or-join [?a ?afc ?an]
(and [?a :account/name ?an]
[?a :account/numeric-code ?afc])
(and [?a :bank-account/name ?an]
[?a :bank-account/numeric-code ?afc]))]
(dc/db auto-ap.datomic/conn)
#inst "2024-09-23"
"NGKG"))
(filter (fn [[_ _ afc]]
(= 12990 afc)))
(map (fn [[_ _ _ _ _ _ a]]
(Math/round a)))))