feat(materials per day): more work on materials per day
This commit is contained in:
@@ -113,3 +113,21 @@ ORDER BY
|
||||
n.ProductionLotHumanReadableId
|
||||
OPTION (MAXRECURSION 0);
|
||||
`;
|
||||
|
||||
export const materialPurchasesPerDay = `
|
||||
use AlplaPROD_test1
|
||||
declare @startDate nvarchar(max) = '[startDate]'
|
||||
declare @endDate nvarchar(max) = '[endDate]'
|
||||
SELECT
|
||||
[IdBestellung] as purhcaseOrder
|
||||
|
||||
,[IdArtikelVarianten]
|
||||
,convert(date, [BestellDatum], 120) as orderDate
|
||||
,convert(date, [Lieferdatum], 120) as deliveryDate
|
||||
,[BestellMenge] as qty
|
||||
,[BestellMengeVPK] as pallets
|
||||
|
||||
FROM [dbo].[T_Bestellpositionen]
|
||||
|
||||
where PositionsStatus = 2 and convert(date, [Lieferdatum], 120) between @startDate and @endDate --and IdBestellung in( 5535,5534,5513)
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user