due date exists.

This commit is contained in:
Bryce Covert
2020-04-18 09:44:42 -07:00
parent 5f309de2d4
commit b28dd64c4a
7 changed files with 35 additions and 22 deletions

View File

@@ -19,6 +19,7 @@
(defn <-datomic [x]
(-> x
(update :invoice/date c/from-date)
(update :invoice/due c/from-date)
(update :invoice/status :db/ident)
(rename-keys {:invoice-payment/_invoice :invoice/payments})))
@@ -33,6 +34,7 @@
'[?v :vendor/name ?sorter]]
"description-original" ['[?e :transaction/description-original ?sorter]]
"date" ['[?e :invoice/date ?sorter]]
"due" ['[?e :invoice/due ?sorter]]
"invoice-number" ['[?e :invoice/invoice-number ?sorter]]
"total" ['[?e :invoice/total ?sorter]]
"outstanding" ['[?e :invoice/outstanding-balance ?sorter]]}

View File

@@ -143,6 +143,10 @@
:auto-ap/add-terms {:txes [[{:db/ident :vendor/terms
:db/doc "How many days till you pay"
:db/valueType :db.type/long
:db/cardinality :db.cardinality/one}]]}
:auto-ap/add-due {:txes [[{:db/ident :invoice/due
:db/doc "When you gotta pay"
:db/valueType :db.type/instant
:db/cardinality :db.cardinality/one}]]}}]
(println "Conforming database...")
(c/ensure-conforms conn norms-map)