From 47b3e1f3f5f1f450952aa301e8a112f4b32f6ee4 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 4 Apr 2023 14:27:56 -0700 Subject: [PATCH] (cloud) made cintas imports work smoothly --- src/clj/auto_ap/jobs/ntg.clj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/clj/auto_ap/jobs/ntg.clj b/src/clj/auto_ap/jobs/ntg.clj index 3c52ed39..789fc447 100644 --- a/src/clj/auto_ap/jobs/ntg.clj +++ b/src/clj/auto_ap/jobs/ntg.clj @@ -1,8 +1,7 @@ (ns auto-ap.jobs.ntg (:require [amazonica.aws.s3 :as s3] -[iol-ion.tx :refer [propose-invoice]] - [auto-ap.datomic :refer [conn audit-transact]] + [auto-ap.datomic :refer [audit-transact conn]] [auto-ap.jobs.core :refer [execute]] [auto-ap.logging :as log] [auto-ap.parse :as parse] @@ -14,7 +13,8 @@ [clojure.string :as str] [clojure.xml :as xml] [clojure.zip :as zip] - [datomic.client.api :as d]) + [datomic.client.api :as d] + [iol-ion.tx :refer [propose-invoice random-tempid]]) (:import (java.util UUID))) @@ -148,7 +148,8 @@ :content first Double/parseDouble) - invoice {:invoice/vendor :vendor/cintas + invoice {:db/id (random-tempid) + :invoice/vendor :vendor/cintas :invoice/import-status :import-status/imported :invoice/status :invoice-status/unpaid :invoice/location location @@ -175,6 +176,7 @@ (-> vendor :vendor/default-account :db/id) :invoice-expense-account/location location :invoice-expense-account/amount (Math/abs total) + :db/id (random-tempid) }]}] (log/info ::cintas-invoice-importing :invoice invoice)