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