feat(puchase history): purhcase history changed to long running no notification

This commit is contained in:
2026-04-08 15:55:25 -05:00
parent 28c226ddbc
commit 34b0abac36
15 changed files with 5918 additions and 20 deletions

View File

@@ -15,16 +15,18 @@ IdBestellung as apo
when 1 then 'Created'
when 2 then 'Ordered'
when 22 then 'Reopened'
when 11 then 'Reopened'
when 4 then 'Planned'
when 5 then 'Partly Delivered'
when 6 then 'Delivered'
when 7 then 'Canceled'
when 8 then 'Closed'
else 'Unknown' end as statusText
,po.Add_User
,po.Add_Date
,po.Upd_User
,po.Upd_Date
,po.IdJournal as journalNum -- use this to validate if we used it already.
,po.Add_User as add_user
,po.Add_Date as add_date
,po.Upd_User as upd_user
,po.Upd_Date as upd_Date
,po.Bemerkung as remark
,po.IdJournal as journal -- use this to validate if we used it already.
,isnull((
@@ -55,7 +57,7 @@ left join
a.IdArtikelvarianten = o.IdArtikelVarianten
where o.IdBestellung = po.IdBestellung
for json path
), '[]') as postion
), '[]') as position
--,*
from T_Bestellungen (nolock) as po
where po.Upd_Date > dateadd(MINUTE, -@intervalCheck, getdate())