Index: cw.mac.rou =================================================================== diff -u -r1134 -r1148 --- cw.mac.rou (.../cw.mac.rou) (revision 1134) +++ cw.mac.rou (.../cw.mac.rou) (revision 1148) @@ -5,20 +5,10 @@ #Include %Prod.Product #Include %CHUI.System ; -co - Set KLNr=0 - For Set KLNr=$O(^KOD(KLNr)) Quit:'KLNr Do - . Set ORDNr="" - . For Set ORDNr=$O(^KOD(KLNr,"F",ORDNr)) Quit:'ORDNr Do - . . Set OLNr=100 - . . For Set OLNr=$O(^KOD(KLNr,"F",ORDNr,OLNr)) Quit:'OLNr Do - . . . Set OrdRec=^KOD(KLNr,"F",ORDNr,OLNr),PRNr=$P(OrdRec,D,2),Aantal=$P(OrdRec,D,3),TOENr=$P(OrdRec,D,27),TLNr=$P(OrdRec,D,28) - . . . Quit:'PRNr Quit:'TOENr Quit:'TLNr - . . . Set LEVNr=$P(^KTO1(TOENr),D),ToeRec=^KTO(LEVNr,TOENr,TLNr) - . . . ;If PRNr=$P(ToeRec,D,2),Aantal=$P(ToeRec,D,3),ORDNr=$P(ToeRec,D,27),OLNr=$P(ToeRec,D,28) Quit - . . . If Aantal=$P(ToeRec,D,3),ORDNr=$P(ToeRec,D,27),OLNr=$P(ToeRec,D,28) Quit - . . . Write !!,OrdRec,!,ToeRec - Quit +HeeftUitzondering(KLNr,PRNr,Niveau,SoSa) + New HeeftUitzondering + + Quit HeeftUitzondering ; ok Set cw(1)="\Test cw" Index: EWORDF.mac.rou =================================================================== diff -u -r762 -r1148 --- EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 762) +++ EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 1148) @@ -57,14 +57,14 @@ . . . Set ^ORDW("D",CONSNr,"S",SoftV)="W" ; wachtend . . . Set ^ORDW("IW",CONSNr)=$G(^ORDW("IW",CONSNr))_SoftV ; index aanpassen . . Do INFO^EWLOG($T(RESCHEDULE)) - . . Set Body="Key : "_CONSNr_";"_ORDNr_";"_OLUNr_";"_SOLNr - . . Set Body=Body_$C(13)_"Product : "_$P(SOLRec,D,1)_" : "_$P($G(^KPR($P(SOLRec,D,1),0)),D,1) - . . Set Body=Body_$C(13)_"Nieuwe 'SoftwareVerwerking' : "_SoftV - . . Set Body=Body_$C(13)_"Server: "_$ZU(110)_" NameSpace: "_$ZU(5) - . . Set From="System@vanhoecke.be" - . . Set Subj="Reschedule picking "_CONSNr - . . Set To=$LB("pv@vanhoecke.be") - . . Do SendMiniMail^vhLib(From,To,Subj,Body,,,,,) + . . ;Set Body="Key : "_CONSNr_";"_ORDNr_";"_OLUNr_";"_SOLNr + . . ;Set Body=Body_$C(13)_"Product : "_$P(SOLRec,D,1)_" : "_$P($G(^KPR($P(SOLRec,D,1),0)),D,1) + . . ;Set Body=Body_$C(13)_"Nieuwe 'SoftwareVerwerking' : "_SoftV + . . ;Set Body=Body_$C(13)_"Server: "_$ZU(110)_" NameSpace: "_$ZU(5) + . . ;Set From="System@vanhoecke.be" + . . ;Set Subj="Reschedule picking "_CONSNr + . . ;Set To=$LB("pv@vanhoecke.be") + . . ;Do SendMiniMail^vhLib(From,To,Subj,Body,,,,,) . Else Do ; niets te vinden in andere magazijnen -> negatieve afmelding . . Set $P(SOLRec,D,2)="E" @@ -128,7 +128,7 @@ Set IsUgly=$G(IsUgly,0) ; De aantallen van de suborderlijnen cumuleren en doorgeven aan de orderlijn, rekening houdend met moeder->kindproducten ; De status/errormelding van de suborderlijn propageren naar orderlijn en verder naar orderhoofding - New SOLNr,Qty,MaxQty,MinQty,MPRNr,KPRNr,CONSRec,OLRec,SOLRec,KQty,SOLCnt,StatCnt,OLStat,FStat,EStat,OLEStat,OLFStat + New SOLNr,Qty,MaxQty,MinQty,MPRNr,KPRNr,CONSRec,OLRec,SOLRec,KQty,SOLCnt,StatCnt,OLStat,FStat,EStat,OLEStat,OLFStat,KindQty Set OLRec=^ORDW("D",CONSNr,"D",ORDNr,OLUNr) If $G(^EWLOG("DEBUG"))=2 Write !,OLRec Set SOLNr="" @@ -146,8 +146,11 @@ Set KPRNr="" Set MPRNr=$P(OLRec,D,1) Set MaxQty=-1,MinQty=999999999 + For Set KPRNr=$O(KQty(KPRNr)) Quit:KPRNr="" Do - .Set KQty=KQty(KPRNr)\$P($G(^PRLINK("D",MPRNr,KPRNr),1),D) + .Set KindQty=$P($G(^PRLINK("D",MPRNr,KPRNr),1),D) + .Quit:KindQty'>0 + .Set KQty=KQty(KPRNr)\KindQty .Set:KQtyMaxQty MaxQty=KQty Set:MinQty=999999999 MinQty=0