Index: EWORDF.mac.rou =================================================================== diff -u -r5214 -r50908 --- EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 5214) +++ EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 50908) @@ -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,KindQty + New SOLNr,Qty,MaxQty,MinQty,MPRNr,KPRNr,CONSRec,OLRec,SOLRec,KQty,SOLCnt,StatCnt,OLStat,FStat,EStat,OLEStat,OLFStat,KindFactor Set OLRec=^ORDW("D",CONSNr,"D",ORDNr,OLUNr) If $G(^EWLOG("DEBUG"))=2 Write !,OLRec Set SOLNr="" @@ -148,11 +148,14 @@ Set MaxQty=-1,MinQty=999999999 For Set KPRNr=$O(KQty(KPRNr)) Quit:KPRNr="" Do - .Set KindQty=$P($G(^PRLINK("D",MPRNr,KPRNr),1),D) - .Quit:KindQty'>0 - .Set KQty=KQty(KPRNr)\KindQty - .Set:KQtyMaxQty MaxQty=KQty + . Set KindFactor=$$GetMoederKindFactorRecursief^PRBS(MPRNr,KPRNr) ; probleem met Moeder -> Kind -> SingleKind oplossen, aangepast PV 14/02/2012 + . ;If KindFactor'>0&&$P(OLRec,D,4)>0 Do ; probleem met Moeder -> Kind -> SingleKind oplossen, aangepast PV 11/02/2012 + . ;. Set KindFactor=$G(KReqQty(KPRNr))\$P(OLRec,D,4) + . ;Set:'KindFactor KindFactor=1 + . Quit:KindFactor'>0 + . Set KQty=KQty(KPRNr)\KindFactor + . Set:KQtyMaxQty MaxQty=KQty Set:MinQty=999999999 MinQty=0 Set:MaxQty=-1 MaxQty=0 If MinQty>0,$P(OLRec,D,3)="E" Set $P(OLRec,D,3)="Q" ;Als er een deel gepickt is dan "Q" ipv "E" @@ -172,7 +175,7 @@ ; Propageren van de lijnstatus naar SOFTV en hoofdrecord PROPLIJN(CONSNr,SoftV,OLFStat,OLEStat) - New SoftVRec,CONSRec,FStat,EStat,Eprio,OLEprio,HerZend + New SoftVRec,CONSRec,FStat,EStat,Eprio,OLEprio,HerZend,tempSoftV,Vzw ; propageren naar SoftV status Set SoftVRec=$G(^ORDW("D",CONSNr,"S",SoftV)) Set FStat=$P(SoftVRec,D,1) @@ -196,11 +199,13 @@ Set:Eprio