shows the matching information.

This commit is contained in:
Bryce Covert
2019-11-17 12:07:06 -08:00
parent d2e48125d1
commit 141e5b06f1
5 changed files with 19 additions and 3 deletions

View File

@@ -46,6 +46,12 @@
:invoice-status/paid
:invoice-status/unpaid)]])})}]] )
(def add-client-identifier
[[{:db/ident :invoice/client-identifier
:db/doc "An identifier found in an uploaded invoice"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}]])
(defn -main [& args]
(println "Creating database...")
(d/create-database uri)
@@ -78,6 +84,7 @@
:auto-ap/add-new-vendors {:txes-fn 'auto-ap.datomic.migrate.add-new-vendors/add-new-vendors :requires [:auto-ap/fix-check-numbers]}
:auto-ap/add-account-visibility-fields {:txes-fn 'auto-ap.datomic.migrate.account-sorting/add-account-visibility-fields :requires [:auto-ap/add-new-vendors]}
:auto-ap/make-every-account-visible {:txes-fn 'auto-ap.datomic.migrate.account-sorting/make-every-account-visible :requires [:auto-ap/add-account-visibility-fields]}
:auto-ap/add-client-identifier2 {:txes add-client-identifier :requires [:auto-ap/make-every-account-visible]}
}]
(println "Conforming database...")

View File

@@ -174,6 +174,7 @@
:invoice
{:fields {:id {:type :id}
:original_id {:type 'Int}
:client_identifier {:type 'String}
:total {:type 'String}
:outstanding_balance {:type 'String}
:invoice_number {:type 'String}

View File

@@ -199,6 +199,7 @@
:else
(conj result (remove-nils #:invoice {:invoice/client (:db/id matching-client)
:invoice/client-identifier customer-identifier
:invoice/vendor matching-vendor
:invoice/invoice-number invoice-number
:invoice/total (Double/parseDouble total)