Index: FLOWORD2.mac.rou =================================================================== diff -u -r3015 -r3120 --- FLOWORD2.mac.rou (.../FLOWORD2.mac.rou) (revision 3015) +++ FLOWORD2.mac.rou (.../FLOWORD2.mac.rou) (revision 3120) @@ -679,9 +679,9 @@ ; ; Event bij aanmaken van een orderlijn ProductOrderLijnGemaakt(KlantID,OrderID,OrderLijnID) - New Rec,ProductID,OrderLijnCode,ProductOrderLijnEventData,ProductOrderLijnGemaaktEvent - Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) - If ProductID{ + New Rec,ProductID,Aantal,OrderLijnCode,ProductOrderLijnEventData,ProductOrderLijnGemaaktEvent + Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),Aantal=$P(Rec,D,3),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) + If ProductID,Aantal>0{ Set ProductOrderLijnEventData = ##class(DOM.VKP.event.ProductOrderLijnEventData).%New(OrderID, OrderLijnCode, KlantID, ProductID) Set ProductOrderLijnGemaaktEvent = ##class(DOM.VKP.event.ProductOrderLijnGemaakt).%New(ProductOrderLijnEventData) Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(ProductOrderLijnGemaaktEvent) @@ -690,9 +690,9 @@ ; ; Event bij verwijderen van een orderlijn ProductOrderLijnAnnulatie(KlantID,OrderID,OrderLijnID) - New Rec,ProductID,OrderLijnCode,ProductOrderLijnEventData,ProductOrderLijnAnnulatieEvent - Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) - If ProductID{ + New Rec,ProductID,Aantal,OrderLijnCode,ProductOrderLijnEventData,ProductOrderLijnAnnulatieEvent + Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),Aantal=$P(Rec,D,3),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) + If ProductID,Aantal>0{ Set ProductOrderLijnEventData = ##class(DOM.VKP.event.ProductOrderLijnEventData).%New(OrderID, OrderLijnCode, KlantID, ProductID) Set ProductOrderLijnAnnulatieEvent = ##class(DOM.VKP.event.ProductOrderLijnAnnulatie).%New(ProductOrderLijnEventData) Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(ProductOrderLijnAnnulatieEvent) @@ -708,9 +708,9 @@ Quit ProductOrderLijnWijzigingen(KlantID,OrderID,OrderLijnID,WijzigingTypes) - New Rec,ProductID,OrderLijnCode,ProductOrderLijnWijzigEventData,ProductOrderLijnGewijzigdEvent - Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) - If ProductID{ + New Rec,ProductID,Aantal,OrderLijnCode,ProductOrderLijnWijzigEventData,ProductOrderLijnGewijzigdEvent + Set Rec=^KOD(KlantID,"F",OrderID,OrderLijnID),ProductID=$P(Rec,D,2),Aantal=$P(Rec,D,3),OrderLijnCode=$$GeefOrderLijnCode^FLOWORD(KlantID,OrderID,OrderLijnID) + If ProductID,Aantal>0{ Set ProductOrderLijnWijzigEventData = ##class(DOM.VKP.event.ProductOrderLijnWijzigEventData).%New(OrderID, OrderLijnCode, KlantID, ProductID, WijzigingTypes) Set ProductOrderLijnGewijzigdEvent = ##class(DOM.VKP.event.ProductOrderLijnGewijzigd).%New(ProductOrderLijnWijzigEventData) Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(ProductOrderLijnGewijzigdEvent)