you can now import from yodlee, automatically trigger rules, and have it show up on the ledger.

This commit is contained in:
Bryce Covert
2019-05-15 22:37:53 -07:00
parent 31aee76e61
commit ac5ffd26fe
2 changed files with 30 additions and 6 deletions

View File

@@ -196,6 +196,14 @@
(assoc transaction
:transaction/matched-rule (:db/id top-match)
:transaction/approval-status (:transaction-rule/transaction-approval-status top-match)
:transaction/accounts (map
(fn [tra]
{:transaction-account/account (:db/id (:transaction-rule-account/account tra))
:transaction-account/amount (Math/abs (* (:transaction-rule-account/percentage tra)
(:transaction/amount transaction)))
:transaction-account/location (:transaction-rule-account/location tra)}
)
(:transaction-rule/accounts top-match))
:transaction/vendor (:db/id (:transaction-rule/vendor top-match)))
transaction)))))