Index: EWTOE.mac.rou =================================================================== diff -u -r51993 -r51994 --- EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 51993) +++ EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 51994) @@ -171,7 +171,10 @@ Set ^KSPW(PRNr,LevTW,R)=AantWMS_D_$J(CifPPL*AantWMS,0,Decimals)_D_LevTB_D_LevTA_D_$E(LevTW,3,4)_"/"_$E(LevTW,5,6)_D_''ORDNr_D Do REMOVE^vhLock("^KSPW(PRNr)"),COPY(TOENr,TLNr,Rec,AantWMS) Do ##class(Flow.Toelevering).RecuPak(PRNr,AantWMS,TOENr,TLUNr,HistRef,.BLKLNr,.BLFactuurNr,.BLFactuurDatum) - If 'AantBo Do KILL(TOENr,TLNr) + If 'AantBo Do + .Set ToeleveringLijnCode=$$GeefToeleveringLijnCode^FLOWTOE(LEVNr,TOENr,TLNr) + .Do KILL(TOENr,TLNr) + .Do Cache05Geproduceerd(LEVNr,TOENr,ToeleveringLijnCode,PRNr,$P(Rec,D,30),Besteld,$P(Rec,D,56),$P(Rec,D,55),$P(Rec,D,57)) If AantBo Do .Set Rec=^KTO(LEVNr,TOENr,TLNr) Set:'$P(Rec,D,23) $P(Rec,D,23)=$P(Rec,D,3) .Set $P(Rec,D,9)=$J(($P(Rec,D,9)/$P(Rec,D,3)*AantBo),0,2) @@ -206,6 +209,8 @@ ...Set Rec=^KTO(LEVNr,TOENr,TLNr) ...New r Set r=$P(Rec,D,28),$P(r,";")=OLNr,$P(Rec,D,28)=r ...Set ^KTO(LEVNr,TOENr,TLNr)=Rec + ...Set ToeleveringLijnCode=$$GeefToeleveringLijnCode^FLOWTOE(LEVNr,TOENr,TLNr) + ...Do Cache05Geproduceerd(LEVNr,TOENr,ToeleveringLijnCode,PRNr,$P(Rec,D,30),AantWMS,$P(Rec,D,56),$P(Rec,D,55),$P(Rec,D,57)) ..Do REMOVE^vhLock("^KOD(KLNr,""F"",ORDNr)") If ORDNr Do .Quit:'$D(^KO1(ORDNr,"F")) @@ -525,7 +530,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,ORDNr,OLUNr) + .....Do MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr) .....Do CHKDEL^FLOWTOE(TOENr) .....If $G(KLNr),ORDNr,LEVNr=$$$LevHalux,'$D(^KTO1(TOENr)) Do ......If $$GetPickDatum^EWORDS6(ORDNr)'<$H Quit:$$IsVoorVandaagOfMorgen^EWORDS6(ORDNr)'=1 @@ -544,7 +549,7 @@ Else Do ERROR^EWLOG($T(UPTOEL)) Quit -MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr,ORDNr,OLUNr) +MARKTBXFINISHED(TOENr,TLUNr,Aantal,BOAantal,PRNr) New rset,BatchID Set rset = ##class(%ResultSet).%New("DOM.PM.Maatwerk.TBX.HaluxWerkoverzichtHelper:qGeefQueueIDs") Do rset.Execute(TOENr,TLUNr) @@ -558,7 +563,7 @@ GROUP BY TOENr) For i=1:1:Aantal { - Set LadeGerecepteerdEventData = ##class(TECH.Events.LadeGerecepteerdEventData).%New(TOENr,TLUNr,PRNr,BatchID,"-1",ORDNr,OLUNr) + Set LadeGerecepteerdEventData = ##class(TECH.Events.LadeGerecepteerdEventData).%New(TOENr,TLUNr,PRNr,BatchID,"-1") Set LadeGerecepteerdEvent = ##class(TECH.Events.LadeGerecepteerdEvent).%New(LadeGerecepteerdEventData) Do ##class(TECH.PubSub.OrchestrationContext).GetEventRaiser().RaiseEventAsync(LadeGerecepteerdEvent) }