From cf8fd9dbb92f1584d901ea50476500261d1f81b0 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Wed, 21 May 2025 20:16:42 -0500 Subject: [PATCH] fix(dm): added day and hour to abbott truck to over come the weird posting issue --- .../controller/dm/ordersIn/mappings/abbottTruckList.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/services/logistics/controller/dm/ordersIn/mappings/abbottTruckList.ts b/server/services/logistics/controller/dm/ordersIn/mappings/abbottTruckList.ts index 7cf85a6..eba99c4 100644 --- a/server/services/logistics/controller/dm/ordersIn/mappings/abbottTruckList.ts +++ b/server/services/logistics/controller/dm/ordersIn/mappings/abbottTruckList.ts @@ -5,7 +5,7 @@ import { db } from "../../../../../../../database/dbclient.js"; import { settings } from "../../../../../../../database/schema/settings.js"; import { query } from "../../../../../sqlServer/prodSqlServer.js"; import { bulkOrderArticleInfo } from "../../../../../sqlServer/querys/dm/bulkOrderArticleInfo.js"; -import { isAfter, parse } from "date-fns"; +import { addDays, addHours, isAfter, parse } from "date-fns"; import { orderState } from "../../../../../sqlServer/querys/dm/orderState.js"; import { postOrders } from "../postOrders.js"; @@ -157,7 +157,7 @@ export const abbottOrders = async (data: any, user: any) => { deliveryAddressId: 8, customerArticleNo: o.customerArticlenumber, quantity: o.qty, - deliveryDate: o.date, + deliveryDate: addHours(addDays(o.date, 1), 1), // adding this in so we can over come the constant 1 day behind thing as a work around customerLineItemNo: 1, // this is how it is currently sent over from abbott customerReleaseNo: 1, // same as above },