small tweaks to prep for staging environment.
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
|
||||
(def import-yodlee (allow-once import-yodlee))
|
||||
|
||||
|
||||
(mount/defstate import-worker
|
||||
:start (scheduler/every (* 1000 60 60 8) import-yodlee)
|
||||
:stop (scheduler/stop import-worker))
|
||||
|
||||
@@ -650,7 +650,7 @@
|
||||
]))
|
||||
(into {}))]
|
||||
(->>
|
||||
(for [[invoice-id invoice-expense-account-id target-account _ amount expense-account location] (drop 1 data)
|
||||
(for [[invoice-id invoice-expense-account-id target-account target-date amount expense-account location] (drop 1 data)
|
||||
:let [
|
||||
invoice-id (Long/parseLong invoice-id)
|
||||
|
||||
@@ -668,6 +668,9 @@
|
||||
(d/entity db invoice-expense-account-id))
|
||||
current-account-id (:db/id (:invoice-expense-account/account invoice-expense-account))
|
||||
target-account-id (Long/parseLong (str/trim target-account))
|
||||
|
||||
target-date (clj-time.coerce/to-date (auto-ap.time/parse target-date auto-ap.time/normal-date))
|
||||
current-date (:invoice/date invoice)
|
||||
|
||||
|
||||
current-expense-account-amount (:invoice-expense-account/amount invoice-expense-account)
|
||||
@@ -693,8 +696,13 @@
|
||||
{:db/id invoice-id
|
||||
:invoice/total target-total})
|
||||
|
||||
{:db/id invoice-id
|
||||
:invoice/expense-accounts invoice-expense-account-id}
|
||||
(when new-account?
|
||||
{:db/id invoice-id
|
||||
:invoice/expense-accounts invoice-expense-account-id})
|
||||
|
||||
(when (and target-date (not= current-date target-date))
|
||||
{:db/id invoice-id
|
||||
:invoice/date target-date})
|
||||
|
||||
(when (and
|
||||
(not (auto-ap.utils/dollars= current-total target-total))
|
||||
|
||||
Reference in New Issue
Block a user