From 2454695124eb4280b063c7acf88041cad8a8a52c Mon Sep 17 00:00:00 2001 From: Bryce Date: Thu, 14 Sep 2023 12:59:32 -0700 Subject: [PATCH] fixes glimpse --- src/clj/auto_ap/jobs/insight_outcome_recommendation.clj | 3 ++- src/clj/auto_ap/ssr/invoice/glimpse.clj | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clj/auto_ap/jobs/insight_outcome_recommendation.clj b/src/clj/auto_ap/jobs/insight_outcome_recommendation.clj index 96e94683..6e13aab1 100644 --- a/src/clj/auto_ap/jobs/insight_outcome_recommendation.clj +++ b/src/clj/auto_ap/jobs/insight_outcome_recommendation.clj @@ -53,7 +53,8 @@ :content-type :json :as :json}) :body - :matches)) + :matches + (doto (#(alog/info ::similarities-found :transaction transaction-id :count (count %) :sample (take 3 %)))))) (do (alog/info ::no-matches-for :transaction transaction-id) []))) diff --git a/src/clj/auto_ap/ssr/invoice/glimpse.clj b/src/clj/auto_ap/ssr/invoice/glimpse.clj index 3677443f..320b1e43 100644 --- a/src/clj/auto_ap/ssr/invoice/glimpse.clj +++ b/src/clj/auto_ap/ssr/invoice/glimpse.clj @@ -336,8 +336,7 @@ invoice_dropzone = new Dropzone(\"#invoice\", { :client/locations first)) due (and (:vendor/terms vendor) - (coerce/to-date - (time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id))))) + (time/plus (coerce/to-date-time date) (time/days (d-vendors/terms-for-client-id vendor client-id)))) scheduled-payment (and (d-vendors/automatically-paid-for-client-id? vendor client-id) due)] (when (and client-id date invoice-number vendor-id total) @@ -349,11 +348,11 @@ invoice_dropzone = new Dropzone(\"#invoice\", { :invoice/total total :invoice/date date - :invoice/scheduled-payment (some-> scheduled-payment coerce/to-date) :invoice/location location :invoice/import-status :import-status/imported :invoice/outstanding-balance total :invoice/status :invoice-status/unpaid} + scheduled-payment (assoc :invoice/scheduled-payment (some-> scheduled-payment coerce/to-date)) (instance? org.joda.time.DateTime due) (assoc :invoice/due (some-> due coerce/to-date)) (instance? org.joda.time.DateTime scheduled-payment) (assoc :invoice/scheduled-payment (some-> scheduled-payment coerce/to-date)))))))