refactor(ti import): made a change to look at the loading date vs the delivery date
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
export let getHeaders = `
|
export let getHeaders = `
|
||||||
select AuftragsNummer as header,
|
select AuftragsNummer as header,
|
||||||
IdAuftragsAbruf as releaseNumber,
|
IdAuftragsAbruf as releaseNumber,
|
||||||
|
AbrufLadeDatum AS LoadingDate,
|
||||||
AbrufLiefertermin as delDate
|
AbrufLiefertermin as delDate
|
||||||
FROM alplaprod_test1.dbo.V_TrackerAuftragsAbrufe (nolock) b
|
FROM alplaprod_test1.dbo.V_TrackerAuftragsAbrufe (nolock) b
|
||||||
|
|
||||||
@@ -19,7 +20,8 @@ on x.IdLieferkondition = c.IdLieferkondition
|
|||||||
on b.IdAdresse = x.addressID
|
on b.IdAdresse = x.addressID
|
||||||
|
|
||||||
WHERE AbrufStatus = 1 and
|
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
|
--AbrufLiefertermin between DATEADD(HOUR, -15, GETDATE()) and DATEADD(HOUR, 36, GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
||||||
|
AbrufLadeDatum between DATEADD(HOUR, -15, GETDATE()) and DATEADD(HOUR, 36, GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
||||||
and x.Abbreviation not in ('exw')
|
and x.Abbreviation not in ('exw')
|
||||||
and IdAuftragsAbruf not in ([exclude])
|
and IdAuftragsAbruf not in ([exclude])
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ on
|
|||||||
ac.pkgId = pkg.pkgId
|
ac.pkgId = pkg.pkgId
|
||||||
|
|
||||||
WHERE AbrufStatus = 1
|
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
|
--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
|
||||||
|
and 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 deliveryContionAbv not in ('EXW')
|
and deliveryContionAbv not in ('EXW')
|
||||||
|
|
||||||
--ORDER BY AbrufLiefertermin)
|
--ORDER BY AbrufLiefertermin)
|
||||||
|
|||||||
Reference in New Issue
Block a user