Index: EWTOE.mac.rou =================================================================== diff -u -r55134 -r61967 --- EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 55134) +++ EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 61967) @@ -162,6 +162,7 @@ Set LevTW=$TR($$EXTDATE^vhDTyp(RCPDate,"DW4"),"/","") Set R=^($O(^KPR(PRNr,"J"))) Set CifPPL=$$CifPPL(PRNr) + Do ReceptiePalletEventRaisen(PRNr,$P($G(WMS(1)),"\"),ORDNr,OLNr,AantWMS) Do HIST(LEVNr,TOENr,TLUNr,PRNr,AantWMS,RCPODate,HistRef,.WMS,,,OverKind) Do KWNODE^FLOWTOE(LEVNr,TOENr,TLNr) Do ProductToeleveringLijnIngeboekt^EWRCPS2(LEVNr,TOENr,TLNr) @@ -241,6 +242,15 @@ Do REMOVE^vhLock("^KTO(LEVNr,TOENr)") Quit + ; +ReceptiePalletEventRaisen(PRNr,PalId,ORDNr,OLUNr,Qty) + New ReceptiePalletEventData,ReceptiePalletEvent + Set ReceptiePalletEventData = ##class(APPS.MAG.Receptie.event.ReceptiePalletEventData).%New(PRNr, PalId, ORDNr, OLUNr, Qty) + Set ReceptiePalletEvent = ##class(APPS.MAG.Receptie.event.ReceptiePalletEvent).%New(ReceptiePalletEventData) + Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(ReceptiePalletEvent) + Quit + ; + ; Om KOM-links op niveau van een kind van het product uit het order-lijn te ondersteunen... WijzigAantalIndienKind(AantalInToelevering,PRNrUitToelevering,PRNrUitOrder) &SQL(SELECT KindBSKey INTO :Sleutel @@ -534,7 +544,7 @@ .....If ORDNr,OLNr Set KLNr=$P(^KO1(ORDNr,"F"),D),R=^KOD(KLNr,"F",ORDNr,OLNr),OLUNr=$P(R,D,15) .....Do RCPPAL^EWPAL(PRNr,$G(C("PALETID")),ORDNr,OLUNr,Aantal) .....Do TOELINE(,TOENr,TLUNr,,Aantal,BOAantal,"",1,.WMS) - .....Do MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr) + .....Do MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr,ORDNr,OLUNr) .....Do CHKDEL^FLOWTOE(TOENr) .....If $G(KLNr),ORDNr,LEVNr=$$$LevHalux,'$D(^KTO1(TOENr)) Do ......If $$GetPickDatum^EWORDS6(ORDNr)'<$H Quit:$$IsVoorVandaagOfMorgen^EWORDS6(ORDNr)'=1 @@ -554,7 +564,7 @@ Else Do ERROR^EWLOG($T(UPTOEL)) Quit -MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr) +MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr,ORDNr,OLUNr) New rset,BatchID Set rset = ##class(%ResultSet).%New("DOM.PM.Maatwerk.TBX.HaluxWerkoverzichtHelper:qGeefQueueIDs") Do rset.Execute(TOENr,TLUNr) @@ -568,7 +578,7 @@ GROUP BY TOENr) For i=1:1:Aantal { - Set LadeGerecepteerdEventData = ##class(TECH.Events.LadeGerecepteerdEventData).%New(TOENr,TLUNr,PRNr,BatchID,"-1") + Set LadeGerecepteerdEventData = ##class(TECH.Events.LadeGerecepteerdEventData).%New(TOENr,TLUNr,PRNr,BatchID,"-1",ORDNr,OLUNr) Set LadeGerecepteerdEvent = ##class(TECH.Events.LadeGerecepteerdEvent).%New(LadeGerecepteerdEventData) ;Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(LadeGerecepteerdEvent) Do EventQueue.AddEvent(LadeGerecepteerdEvent)