bug fixes.

This commit is contained in:
2022-03-24 08:19:09 -07:00
parent 7d0d600870
commit 5d17091847
2 changed files with 17 additions and 6 deletions

View File

@@ -184,13 +184,17 @@
:not-ready
(and (:bank-account/start-date bank-account)
(not (t/after? (coerce/to-date-time (:transaction/date transaction))
(-> bank-account :bank-account/start-date coerce/to-date-time))))
(and (not (t/after? (coerce/to-date-time (:transaction/date transaction))
(-> bank-account :bank-account/start-date coerce/to-date-time)))
(not (t/equal? (coerce/to-date-time (:transaction/date transaction))
(-> bank-account :bank-account/start-date coerce/to-date-time)))))
:not-ready
(and (:client/locked-until (:client/_bank-accounts bank-account))
(not (t/after? (coerce/to-date-time (:transaction/date transaction))
(coerce/to-date-time (:client/locked-until (:client/_bank-accounts bank-account))))))
(and (not (t/after? (coerce/to-date-time (:transaction/date transaction))
(coerce/to-date-time (:client/locked-until (:client/_bank-accounts bank-account)))))
(not (t/equal? (coerce/to-date-time (:transaction/date transaction))
(coerce/to-date-time (:client/locked-until (:client/_bank-accounts bank-account)))))))
:not-ready
:else

View File

@@ -109,7 +109,15 @@
:code (:code new-client-data) ;; TODO add validation can't change
:email (:email new-client-data)
:locked-until (some-> new-client-data :locked-until #_(date->str standard))
:locked-until (cond (not (:locked-until new-client-data))
nil
(instance? goog.date.Date (:locked-until new-client-data))
(date->str (:locked-until new-client-data) standard)
:else
(:locked-until new-client-data)
)
:locations (mapv :location (:locations new-client-data))
:matches (mapv :match (:matches new-client-data))
:location-matches (:location-matches new-client-data)
@@ -130,7 +138,6 @@
:amount amount})
(:forecasted-transactions new-client-data))
:bank-accounts (map (fn [{:keys [number name check-number plaid-account intuit-bank-account include-in-reports type id code numeric-code start-date bank-name routing bank-code new? sort-order visible yodlee-account-id locations yodlee-account]}]
(println intuit-bank-account)
{:number number
:name name
:check-number (when-not (str/blank? check-number)