adding yodlee vetndors.

This commit is contained in:
Bryce Covert
2019-04-16 06:30:24 -07:00
parent e81543b8af
commit 6b1252390b
10 changed files with 59 additions and 14 deletions

View File

@@ -124,9 +124,10 @@
:requires [:auto-ap/convert-vendors]}
:auto-ap/convert-transactions {:txes-fn `add-general-ledger/convert-transactions
:requires [:auto-ap/convert-invoices]}
:auto-ap/add-yodlee-merchant {:txes add-general-ledger/add-yodlee-merchant :requires [:auto-ap/convert-transactions]}
:auto-ap/bulk-load-invoice-ledger3 {:txes-fn `add-general-ledger/bulk-load-invoice-ledger :requires [:auto-ap/convert-transactions]}
:auto-ap/bulk-load-transaction-ledger3 {:txes-fn `add-general-ledger/bulk-load-transaction-ledger :requires [:auto-ap/convert-transactions]}
#_#_:auto-ap/bulk-load-invoice-ledger3 {:txes-fn `add-general-ledger/bulk-load-invoice-ledger :requires [:auto-ap/convert-transactions]}
#_#_:auto-ap/bulk-load-transaction-ledger3 {:txes-fn `add-general-ledger/bulk-load-transaction-ledger :requires [:auto-ap/convert-transactions]}
}]
(println "Conforming database...")

View File

@@ -81,6 +81,23 @@
:db/cardinality :db.cardinality/one
:db/doc "The debit/credit for this transaction"}]])
(def add-yodlee-merchant
[[{:db/ident :yodlee-merchant/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "The yodlee merchant name"}
{:db/ident :yodlee-merchant/id
:db/valueType :db.type/string
:db/unique :db.unique/identity
:db/cardinality :db.cardinality/one
:db/doc "The yodlee merchant id"}
{:db/ident :transaction/yodlee-merchant
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "The yodlee merchant"}]])
(def add-accounts
[[
{:db/ident :account/code

View File

@@ -75,7 +75,8 @@
(->> (d/pull-many db '[* {:transaction/client [:client/name :db/id :client/code]
:transaction/bank-account [:bank-account/name :bank-account/code :bank-account/yodlee-account-id :db/id]
:transaction/vendor [:db/id :vendor/name]
:transaction/account [:db/id :account/name :account/numeric-code]}]
:transaction/account [:db/id :account/name :account/numeric-code]
:transaction/yodlee-merchant [:db/id :yodlee-merchant/id :yodlee-merchant/name]}]
ids)
(map #(update % :transaction/date c/from-date))
(map #(update % :transaction/post-date c/from-date))
@@ -95,7 +96,8 @@
'[* {:transaction/client [:client/name :db/id :client/code :client/locations]
:transaction/bank-account [:bank-account/name :bank-account/code :bank-account/yodlee-account-id :db/id]
:transaction/vendor [:db/id :vendor/name]
:transaction/account [:db/id :account/name :account/numeric-code]}]
:transaction/account [:db/id :account/name :account/numeric-code]
:transaction/yodlee-merchant [:db/id :yodlee-merchant/id :yodlee-merchant/name]}]
id)
(update :transaction/date c/from-date)
(update :transaction/post-date c/from-date)