feat(missing inv): adding a way to check for missing data in case it dose pull on the correct days

This commit is contained in:
2025-11-03 18:01:58 -06:00
parent 8fca201e04
commit d17edb1f9c
7 changed files with 232 additions and 245 deletions

View File

@@ -0,0 +1,18 @@
export const missingHistInv = `
use AlplaPROD_test1
declare @histDate date = '[eomHistDate]'
SELECT
IdArtikelVarianten AS article,
ArtikelVariantenBez AS articleDescription,
ArtikelVariantenTypBez,
IdArtikelVariantenTyp,
Datum,
Menge AS total_QTY,
x.IdWarenlager,
w.LagerTyp,
w.Bezeichnung
FROM dbo.V_LagerBestandsHistorie (nolock) x
join
dbo.T_WarenLager as w on x.IdWarenlager=w.IdWarenLager
where w.LagerTyp NOT IN ('4','5','6') AND CONVERT(DATE, Datum) LIKE @histDate
`;