From 155b7d92aa876cf9e313dc4cd2cd68193f4a9772 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Thu, 13 Mar 2025 15:43:45 -0500 Subject: [PATCH] fix(query): shipmentPallets change from last move to production date --- server/services/sqlServer/querys/ocme/shipmentPallets.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/services/sqlServer/querys/ocme/shipmentPallets.ts b/server/services/sqlServer/querys/ocme/shipmentPallets.ts index 6903817..6f629cd 100644 --- a/server/services/sqlServer/querys/ocme/shipmentPallets.ts +++ b/server/services/sqlServer/querys/ocme/shipmentPallets.ts @@ -4,10 +4,12 @@ LagerAbteilungKurzBez as lane, Produktionslos as lotNum, lfdnr as runningNumber, IdAdresse as addressID, -BewegungsDatumMax as lastMove, IdArtikelVarianten as article +ProduktionsDatumMin as productionDate, +IdArtikelVarianten as article from AlplaPROD_test1.dbo.V_LagerPositionenBarcodes (nolock) where IdArtikelVarianten = [article] and LagerAbteilungKurzBez in ([lanes]) +and IdWarenlager not in (1) and GesperrtAktivSum in (0) order by CASE WHEN BewegungsDatumMax <= DATEADD(DAY, -[fifo], GETDATE()) THEN 0