19 lines
603 B
TypeScript
19 lines
603 B
TypeScript
export const inhouseDelivery = `
|
|
declare @shiftStart varchar(max) = (select top(1) CAST(StartDate AS time(0)) from [test1_AlplaPROD2.0_Read].[masterData].[ShiftDefinition] (nolock) order by TeamNumber)
|
|
|
|
SELECT TOP (1000)
|
|
ProduktionsLos as lot
|
|
,Menge as qty
|
|
,Barcode as barcode
|
|
,IdArtikelVarianten as av
|
|
,ArtikelVariantenAlias as alias
|
|
,LieferDatum as deliveryDate
|
|
--.*
|
|
FROM [AlplaPROD_test1].[dbo].V_LieferBuchungen (nolock)
|
|
|
|
where Urheber = 1350 and ProduktionsLos > 0
|
|
and LieferDatum between '[startDate]' + ' ' + @shiftStart
|
|
and '[endDate]' + ' ' + @shiftStart
|
|
order by LieferDatum desc
|
|
`;
|