refactor(histoircal data): cahnge to not look at yestrday

This commit is contained in:
2025-10-01 10:17:12 -05:00
parent 373178bf0d
commit 71713937c7

View File

@@ -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,