Merge branch 'master' into try-tailwind
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
(:import [java.util UUID]))
|
(:import [java.util UUID]))
|
||||||
|
|
||||||
(def random-tempid iol-ion.utils/random-tempid)
|
(def random-tempid iol-ion.utils/random-tempid)
|
||||||
|
(defn composite-tempid [& pieces]
|
||||||
|
(format "hashed-%d" (.hashCode (set pieces))))
|
||||||
|
|
||||||
(def by iol-ion.utils/by)
|
(def by iol-ion.utils/by)
|
||||||
(def pull-many iol-ion.utils/pull-many)
|
(def pull-many iol-ion.utils/pull-many)
|
||||||
(def remove-nils iol-ion.utils/remove-nils)
|
(def remove-nils iol-ion.utils/remove-nils)
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
:content
|
:content
|
||||||
first
|
first
|
||||||
Double/parseDouble)
|
Double/parseDouble)
|
||||||
invoice {:db/id (random-tempid)
|
invoice {:db/id (random-tempid )
|
||||||
:invoice/vendor :vendor/cintas
|
:invoice/vendor :vendor/cintas
|
||||||
:invoice/import-status :import-status/imported
|
:invoice/import-status :import-status/imported
|
||||||
:invoice/status :invoice-status/unpaid
|
:invoice/status :invoice-status/unpaid
|
||||||
@@ -268,7 +268,8 @@
|
|||||||
(mark-error k)
|
(mark-error k)
|
||||||
[]))))
|
[]))))
|
||||||
(into []))]
|
(into []))]
|
||||||
(audit-transact transaction {:user/name "sysco importer" :user/role "admin"})
|
(doseq [t transaction]
|
||||||
|
(audit-transact [t] {:user/name "sysco importer" :user/role "admin"}))
|
||||||
(log/info ::success
|
(log/info ::success
|
||||||
:count (count transaction)
|
:count (count transaction)
|
||||||
:sample (take 3 transaction)))
|
:sample (take 3 transaction)))
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
[{:client/location-matches [:location-match/location :location-match/matches]}
|
[{:client/location-matches [:location-match/location :location-match/matches]}
|
||||||
:client/default-location
|
:client/default-location
|
||||||
:client/locations]
|
:client/locations]
|
||||||
matching-client)
|
(:db/id matching-client))
|
||||||
location-hint
|
location-hint
|
||||||
location-hint )
|
location-hint )
|
||||||
:date (coerce/to-date date)
|
:date (coerce/to-date date)
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
(defn exact-match
|
(defn exact-match
|
||||||
([clients invoice-client-name]
|
([clients invoice-client-name]
|
||||||
(->> clients
|
(->> clients
|
||||||
(filter (fn [{:keys [:client/matches :client/name] :as client :or {matches []}}]
|
(filter (fn [{:keys [:client/matches :client/location-matches :client/locations :client/name] :as client :or {matches []}}]
|
||||||
(seq
|
(seq
|
||||||
(filter (fn [m]
|
(filter (fn [m]
|
||||||
(and
|
(and
|
||||||
|
|||||||
@@ -136,8 +136,8 @@
|
|||||||
|
|
||||||
(defn import->invoice [{:keys [invoice-number source-url customer-identifier account-number total date vendor-code text full-text client-override vendor-override location-override import-status]}]
|
(defn import->invoice [{:keys [invoice-number source-url customer-identifier account-number total date vendor-code text full-text client-override vendor-override location-override import-status]}]
|
||||||
(let [matching-client (cond
|
(let [matching-client (cond
|
||||||
account-number (d-clients/exact-match account-number)
|
account-number (:db/id (d-clients/exact-match account-number))
|
||||||
customer-identifier (d-clients/best-match customer-identifier)
|
customer-identifier (:db/id (d-clients/best-match customer-identifier))
|
||||||
client-override (Long/parseLong client-override))
|
client-override (Long/parseLong client-override))
|
||||||
|
|
||||||
matching-vendor (match-vendor vendor-code vendor-override)
|
matching-vendor (match-vendor vendor-code vendor-override)
|
||||||
|
|||||||
3
start-solr.sh
Executable file
3
start-solr.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#/bin/bash
|
||||||
|
sudo docker run --rm -ti -v ~/dev/integreat/data/solr:/var/solr --network=bridge -p 8983:8983 solr
|
||||||
|
|
||||||
Reference in New Issue
Block a user