supports starting from scratch.
This commit is contained in:
@@ -23,11 +23,16 @@
|
||||
:db/doc "The location of the location match"}
|
||||
]])
|
||||
|
||||
(def add-starter
|
||||
[[{:db/id [:client/code "CBC"]
|
||||
:client/matches ["campbell brewing company"]
|
||||
:client/location-matches [{:location-match/location "CB"
|
||||
:location-match/matches ["campbell brewing company"]}]}]])
|
||||
(defn add-starter [conn]
|
||||
(if (seq (d/query {:query {:find '[?e]
|
||||
:in ['$]
|
||||
:where ['[?e :client/code "CBC"]]}
|
||||
:args [(d/db conn)]}))
|
||||
[[{:db/id [:client/code "CBC"]
|
||||
:client/matches ["campbell brewing company"]
|
||||
:client/location-matches [{:location-match/location "CB"
|
||||
:location-match/matches ["campbell brewing company"]}]}]]
|
||||
[[]]))
|
||||
|
||||
(defn add-default-location [conn]
|
||||
[[{:db/ident :client/default-location
|
||||
@@ -36,8 +41,13 @@
|
||||
:db/doc "The default location if one can't be found"}]])
|
||||
|
||||
(defn add-default-location-2 [conn]
|
||||
[[{:db/id [:client/code "CBC"]
|
||||
:client/default-location "CB"}]])
|
||||
(if (seq (d/query {:query {:find '[?e]
|
||||
:in ['$]
|
||||
:where ['[?e :client/code "CBC"]]}
|
||||
:args [(d/db conn)]}))
|
||||
[[{:db/id [:client/code "CBC"]
|
||||
:client/default-location "CB"}]]
|
||||
[[]]))
|
||||
|
||||
(def add-import-status
|
||||
[[{:db/ident :invoice/import-status
|
||||
|
||||
Reference in New Issue
Block a user