export let getHeaders = `
select AuftragsNummer as header, 
IdAuftragsAbruf as releaseNumber,
AbrufLadeDatum AS LoadingDate,
AbrufLiefertermin as delDate 
FROM alplaprod_test1.dbo.V_TrackerAuftragsAbrufe (nolock) b

left join 
(
select IdAdressen addressID, 
x.Bezeichnung as name, 
c.Bezeichnung as deliveryCondition, 
c.Kurzbezeichnung as Abbreviation 
from AlplaPROD_test1.dbo.t_Adressen (nolock) x
left join 
AlplaPROD_test1.[dbo].[T_Lieferkonditionen] (nolock) c
on x.IdLieferkondition = c.IdLieferkondition
) x

on b.IdAdresse = x.addressID

WHERE AbrufStatus = 1 and
--AbrufLiefertermin between DATEADD(HOUR, -[from], getdate()) and  DATEADD(HOUR, [to], GETDATE()) -- this number will be grabbed from the db with a default of 24hours
AbrufLadeDatum between DATEADD(HOUR, -[from], getdate()) and  DATEADD(HOUR, [to], GETDATE()) -- this number will be grabbed from the db with a default of 24hours
and x.Abbreviation not in ('exw')
and IdAuftragsAbruf not in ([exclude])
`;
