fix(query): shipmentPallets change from last move to production date

This commit is contained in:
2025-03-13 15:43:45 -05:00
parent 6158f254b7
commit 155b7d92aa

View File

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