feat(eom): lastSales, lastPurch added to be pulled with new template

This commit is contained in:
2025-08-29 11:26:26 -05:00
parent af47c1582e
commit 7cc3778506
12 changed files with 237 additions and 12 deletions

View File

@@ -0,0 +1,17 @@
export const lastSalesPriceCheck = `
use AlplaPROD_test1
select * from
(select IdArtikelvarianten as av,
VKPreis as salesPrice,
MPB, FWMPAlpla,
FWMPB,
ROW_NUMBER() over(partition by IdArtikelVarianten order by gueltigabdatum desc) rn,
convert(date, gueltigabdatum, 120) as validDate
from dbo.T_HistoryVK (nolock)
where convert(date, gueltigabdatum, 120) <= '[date]' and StandardKunde = 1) a
where rn =1
order by av asc,
validDate desc
`;