Added bank accounts being credit card accounts

This commit is contained in:
Bryce Covert
2019-04-17 19:30:01 -07:00
parent 4fe52cad5a
commit 3ecfde69d0
11 changed files with 96 additions and 23 deletions

View File

@@ -56,7 +56,8 @@
(->> (d/pull-many db '[* {:journal-entry/client [:client/name :client/code :db/id]
:journal-entry/vendor [:vendor/name :db/id]
:journal-entry/line-items [* {:journal-entry-line/account [*
{:account/type [*]}]}]
{:account/type [*]}
{:bank-account/type [*]}]}]
}]
ids)

View File

@@ -118,6 +118,8 @@
:requires [:auto-ap/change-expense-account-to-entity]}
:auto-ap/add-location-to-transaction {:txes add-general-ledger/add-location-to-transaction
:requires [:auto-ap/add-account-to-vendor]}
:auto-ap/add-credit-bank-account {:txes add-general-ledger/add-credit-bank-account
:requires [:auto-ap/add-location-to-transaction]}
:auto-ap/convert-vendors {:txes-fn `add-general-ledger/convert-vendors
:requires [:auto-ap/add-location-to-transaction]}
:auto-ap/convert-invoices {:txes-fn `add-general-ledger/convert-invoices

View File

@@ -269,6 +269,11 @@
:db/cardinality :db.cardinality/one
:db/doc "Location of the transaction's target"}]])
(def add-credit-bank-account
[[{:db/ident :bank-account-type/credit}]])
#_(do (doseq [tran (convert-transactions (d/connect auto-ap.datomic/uri))]
@(d/transact (d/connect auto-ap.datomic/uri) tran))