From 71713937c7c728cbe85e590bd650985354a6eff5 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Wed, 1 Oct 2025 10:17:12 -0500 Subject: [PATCH] refactor(histoircal data): cahnge to not look at yestrday --- lstV2/server/services/eom/utils/historicalInv.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lstV2/server/services/eom/utils/historicalInv.ts b/lstV2/server/services/eom/utils/historicalInv.ts index 767cc56..3394ad2 100644 --- a/lstV2/server/services/eom/utils/historicalInv.ts +++ b/lstV2/server/services/eom/utils/historicalInv.ts @@ -26,7 +26,7 @@ export const historicalInvIMmport = async () => { } // check if we have data already for today this way we dont duplicate anything. const today = new Date(); - today.setDate(today.getDate() - 1); + //today.setDate(today.getDate() - 1); const dateCheck = data?.filter( (i: any) => i.histDate === format(today, "yyyy-MM-dd") @@ -62,7 +62,8 @@ export const historicalInvIMmport = async () => { const importInv = inv.data ? inv.data : []; const eomImportData = importInv.map((i: any) => { return { - histDate: sql`(NOW() - INTERVAL '1 day')::date`, + //histDate: sql`(NOW() - INTERVAL '1 day')::date`, + histDate: sql`(NOW())::date`, plantToken: plantToken[0].value, article: i.av, articleDescription: i.Alias,