fix(datamart): corrected the date grab to be print date vs delivery date
This commit is contained in:
@@ -27,6 +27,7 @@ import { sendEmail } from "./services/notifications/controller/sendMail.js";
|
|||||||
import notify from "./services/notifications/notifyService.js";
|
import notify from "./services/notifications/notifyService.js";
|
||||||
import eom from "./services/eom/eomService.js";
|
import eom from "./services/eom/eomService.js";
|
||||||
import dataMart from "./services/dataMart/dataMartService.js";
|
import dataMart from "./services/dataMart/dataMartService.js";
|
||||||
|
import qualityRequest from "./services/quality/qualityService.js";
|
||||||
|
|
||||||
// create the main prodlogin here
|
// create the main prodlogin here
|
||||||
const username = "lst_user";
|
const username = "lst_user";
|
||||||
@@ -104,6 +105,7 @@ const routes = [
|
|||||||
notify,
|
notify,
|
||||||
eom,
|
eom,
|
||||||
dataMart,
|
dataMart,
|
||||||
|
qualityRequest,
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const appRoutes = routes.forEach((route) => {
|
const appRoutes = routes.forEach((route) => {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
export const deliveryByDateRange = `
|
export const deliveryByDateRange = `
|
||||||
|
|
||||||
use AlplaPROD_test1
|
use AlplaPROD_test1
|
||||||
DECLARE @StartDate DATE = ' [startDate] ' -- 2025-1-1
|
DECLARE @StartDate DATE = ' 1990-1-1 ' -- 2025-1-1
|
||||||
DECLARE @EndDate DATE = '[endDate]' -- 2025-1-31
|
DECLARE @EndDate DATE = '2025-4-18' -- 2025-1-31
|
||||||
select * from
|
select * from
|
||||||
(select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant,
|
(select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant,
|
||||||
AuftragsNummer as OrderNumber,
|
AuftragsNummer as OrderNumber,
|
||||||
@@ -37,7 +36,7 @@ dbo.V_ArtikelKomplett on V_TrackerAuftragsAbrufe.IdArtikelVarianten =
|
|||||||
dbo.V_ArtikelKomplett.IdArtikelvarianten
|
dbo.V_ArtikelKomplett.IdArtikelvarianten
|
||||||
where GelieferteMengeVPK > 0 AND (
|
where GelieferteMengeVPK > 0 AND (
|
||||||
AbrufLiefertermin IS NULL
|
AbrufLiefertermin IS NULL
|
||||||
OR CONVERT(date, AbrufLiefertermin) BETWEEN @StartDate AND @EndDate
|
OR CONVERT(date, JournalDatum) BETWEEN @StartDate AND @EndDate
|
||||||
)
|
)
|
||||||
|
|
||||||
/*in house*/
|
/*in house*/
|
||||||
@@ -69,5 +68,5 @@ where CONVERT(date, Upd_Date) BETWEEN @StartDate AND @EndDate
|
|||||||
) x
|
) x
|
||||||
|
|
||||||
|
|
||||||
order by DeliveryDate desc
|
order by Bol_PrintDate desc
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user