Index: RPLKOM.mac.rou =================================================================== diff -u -r37035 -r71172 --- RPLKOM.mac.rou (.../RPLKOM.mac.rou) (revision 37035) +++ RPLKOM.mac.rou (.../RPLKOM.mac.rou) (revision 71172) @@ -402,22 +402,23 @@ . . Set Rec=^(ORDNr,1) . . Quit:$P(Rec,D,22) . . If $P(Rec,D,23)=1 Quit:$$EXTDATE^vhLib.DataTypes(,"DWN")'=6 Set IntVw=30 ; Indien voorlopig gesloten mail naar de boekhouding en enkel op zaterdag (Rita Meersman) - . . Else Quit:$$EXTDATE^vhLib.DataTypes(,"DWN")>5 Set IntVw=$$INTVW^KLOPV(KLNr) Set:'IntVw IntVw=1007 ; WV als vangnet + . . Else Quit:$$EXTDATE^vhLib.DataTypes(,"DWN")>5 Set IntVw=1007 ;$$INTVW^KLOPV(KLNr) Set:'IntVw IntVw=1007 ; WV als vangnet . . Set NoClose(IntVw,KLNr,ORDNr)=$P(Rec,D,2) . . Set Klant=KLNr_" "_$P(^KKL(^KK1(KLNr),0),D,2) . . Set:$G(NoClose(IntVw))<$L(Klant) NoClose(IntVw)=$L(Klant) . . Set NoClose(IntVw,KLNr)=Klant Set From=##class(TECH.Context.RuntimeContext).Instance().GeefServerNaam()_"@VANHOECKE.BE",IntVw="" For Set IntVw=$O(NoClose(IntVw)) Quit:IntVw="" Do - . Set To=$$REPLACE^vhRtn1($$USERNAME^vhUSER(IntVw,"@"),";",""",""") + . Set To="Bidisupport@vanhoecke.be" ;$$REPLACE^vhRtn1($$USERNAME^vhUSER(IntVw,"@"),";",""",""") . Xecute "Set To=$LB("""_To_""")" . Set (Body,KLNr)="",Lijnen=0 . For Set KLNr=$O(NoClose(IntVw,KLNr)) Quit:KLNr="" Do . . Set Klant=NoClose(IntVw,KLNr),ORDNr="",Body=Body_$C(13) . . For Set ORDNr=$O(NoClose(IntVw,KLNr,ORDNr)) Quit:ORDNr="" Do - . . . Set Body=Body_Klant_$J("",NoClose(IntVw)-$L(Klant))_$S($L(Klant):": ",1:" ")_ORDNr_" "_NoClose(IntVw,KLNr,ORDNr)_$$nclGeefCreatorInfo(ORDNr,$P($G(^KOD(KLNr,"F",ORDNr,1)),"\",8))_$S(IntVw=1007:$$nclGeefOrderDataInfo(KLNr,ORDNr),1:"")_$C(13),Klant="",Lijnen=Lijnen+1 + . . . Set Body=Body_Klant_$J("",NoClose(IntVw)-$L(Klant))_$S($L(Klant):": ",1:" ")_ORDNr_" "_NoClose(IntVw,KLNr,ORDNr)_$$nclGeefCreatorInfo(ORDNr,$P($G(^KOD(KLNr,"F",ORDNr,1)),"\",8))_$S(IntVw=99991007:$$nclGeefOrderDataInfo(KLNr,ORDNr),1:"")_$C(13) + . . . Set Klant="",Lijnen=Lijnen+1 . Set Subject="Niet afgesloten order"_$S(Lijnen>1:"s",1:""),Body="Volgend"_$S(Lijnen>1:"e orders zijn",1:" order is")_" nog niet gesloten:"_$C(13)_$C(13)_Body - . Set Status=$$SendMiniMail^vhLib(From,To,Subject,Body) + . Set:Lijnen>0 Status=$$SendMiniMail^vhLib(From,To,Subject,Body) Quit nclGeefCreatorInfo(OrderID,CreatorInfo) New CreatorInfo,UserID,GebruikerInitialen