more progress on cash flow.

This commit is contained in:
Bryce Covert
2020-05-27 07:30:40 -07:00
parent f78133cbea
commit e77e02137c
3 changed files with 121 additions and 61 deletions

View File

@@ -231,7 +231,32 @@
:auto-ap/add-cleared-against {:txes [[{:db/ident :transaction/cleared-against
:db/doc "which entitiy it was cleared against"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}]]}}]
:db/cardinality :db.cardinality/one}]]}
:auto-ap/add-cash-flow-schema {:txes [[{:db/ident :client/weekly-debits
:db/doc "How much money gets debited each week"
:db/valueType :db.type/double
:db/cardinality :db.cardinality/one}
{:db/ident :client/weekly-credits
:db/doc "How much money gets credited each week"
:db/valueType :db.type/double
:db/cardinality :db.cardinality/one}
{:db/ident :client/forecasted-transactions
:db/doc "Regular, planned transactions"
:db/valueType :db.type/ref
:db/isComponent true
:db/cardinality :db.cardinality/many}
{:db/ident :forecasted-transaction/amount
:db/doc "Amount of a forcested transaction"
:db/valueType :db.type/double
:db/cardinality :db.cardinality/one}
{:db/ident :forecasted-transaction/day-of-month
:db/doc "Which day the transaction occurs"
:db/valueType :db.type/long
:db/cardinality :db.cardinality/one}
{:db/ident :forecasted-transaction/identifier
:db/doc "An identifier for this forcasted transaction, e.g., 'RENT'"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}]]}}]
(println "Conforming database...")
(c/ensure-conforms conn norms-map)
(when (not (seq args))