Index: EWORDF.mac.rou =================================================================== diff -u -r29059 -r66310 --- EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 29059) +++ EWORDF.mac.rou (.../EWORDF.mac.rou) (revision 66310) @@ -9,12 +9,15 @@ If 'IsUgly Do ;Ugly versie wordt verderop ingevuld . Set SoftV="E" ; EWMS . Set:$L(CONSNr)=7 SoftV=$E(CONSNr,7),CONSNr=$E(CONSNr,1,6) ;indien komend van EWMS : Groepering splitsen + Set:$G(C("SOFTV"))="V" SoftV="V" ;OBJT Set ORDNr=C("ORDNR") Set OLUNr=C("OLNR")\100 Set SOLNr=C("OLNR")#100*100+C("OLSPLITSNR") + ;w !,$name(^ORDW("D",CONSNr,"D",ORDNr,OLUNr)),! + ;w !,$name(^ORDW("D",CONSNr,"D",ORDNr,OLUNr,SOLNr)),! + If CONSNr,ORDNr,OLUNr,SOLNr,$D(^ORDW("D",CONSNr,"D",ORDNr,OLUNr)) Else Do ERROR^EWLOG($T(NOSUBOL)) Quit - If $P(^ORDW("D",CONSNr),D,20)="B" Do Quit .Do ERROR^EWLOG($T(OPBONL)) Quit .Set $P(^ORDW("D",CONSNr),D,21)="e" @@ -39,7 +42,6 @@ .If $P(SOLRec2,D,3)<1 Do ERROR^EWLOG($T(QTYNEG)) Set $P(SOLRec2,D,2)="E" .Set AddSOL=1 .Set ^ORDW("D",CONSNr,"D",ORDNr,OLUNr,SOLNr2)=SOLRec2 ; wordt de nieuwe hoofdlijn - If C("STATUS")="PNOK" Do ; Orderlijn NOK: geen goederen voor dit orderlijn . If 'IsUgly,##class(EWMS.Inventory).GetQty($P(SOLRec,D,1),$LB(2,3,4))>0 Do ; WMS heeft een NOK gestuurd maar er voorraad in UGLY -> Lijn converteren naar UGLY picking . . Set SoftV="U" @@ -79,7 +81,7 @@ .Set $P(SOLRec,D,6)=C("DATUM") .Set $P(SOLRec,D,10)=C("SOURCEPALID") .Set $P(SOLRec,D,12)=C("USER") - .Set $P(SOLRec,D,14)=$S(IsUgly:C("LOCMSTR"),1:$$FYSMAG($P(SOLRec,D,1),C("SOURCEPALID"),C("PALKLID"))) + .Set $P(SOLRec,D,14)=$S(SoftV="V":"V",IsUgly:C("LOCMSTR"),1:$$FYSMAG($P(SOLRec,D,1),C("SOURCEPALID"),C("PALKLID"))) ;OBJT .Set $P(SOLRec,D,6)=C("DATUM") Set:SOLRec'="" ^ORDW("D",CONSNr,"D",ORDNr,OLUNr,SOLNr)=SOLRec If $G(^EWLOG("DEBUG"))=2 Write !,SOLRec @@ -131,8 +133,8 @@ .Set SOLCnt=SOLCnt+1 .Set SOLRec=^ORDW("D",CONSNr,"D",ORDNr,OLUNr,SOLNr) .Set KPRNr=$P(SOLRec,D,1) - .Set KQty(KPRNr)=$G(KQty(KPRNr))+$P(SOLRec,D,4) - .;Set KReqQty(KPRNr)=$G(KReqQty(KPRNr))+$P(SOLRec,D,3) + .Set KQty(KPRNr)=$G(KQty(KPRNr))+$P(SOLRec,D,4 ) + .;Set KReqQty(KPRNr)=$G(KReqQty(KPRNr))+$P(SOLRec,D,3) ; probleem met Moeder -> Kind -> SingleKind oplossen, aangepast PV 14/02/2012; .Set:$S(IsUgly:"U",1:"W")'[$P(SOLRec,D,2) StatCnt($P(SOLRec,D,2))=$G(StatCnt($P(SOLRec,D,2)))+1 Set $P(OLRec,D,2)=$S($G(StatCnt("A"))+$G(StatCnt("Q"))+$G(StatCnt("E"))=SOLCnt:"A",$D(StatCnt):"P",1:"W") Set $P(OLRec,D,3)=$S($G(StatCnt("E")):"E",$G(StatCnt("Q")):"Q",1:"") @@ -168,7 +170,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) @@ -192,11 +194,13 @@ Set:Eprio