Index: FLOWTOE3.mac.rou =================================================================== diff -u -r29059 -r30481 --- FLOWTOE3.mac.rou (.../FLOWTOE3.mac.rou) (revision 29059) +++ FLOWTOE3.mac.rou (.../FLOWTOE3.mac.rou) (revision 30481) @@ -582,6 +582,7 @@ set KlantID = Toelevering.GeefKlantID() #dim Product As DOM.PM.Product Set LEVNr=$P(^KTO1(TOENr),D),TLNr=100 + // SortKey dient niet voor sortering, maar voor het aanduiden welke lijnen samen mogen blijven, en welke niet. For Set TLNr=$O(^KTO(LEVNr,TOENr,TLNr)) Quit:TLNr="" Do . Set R=^KTO(LEVNr,TOENr,TLNr),PRNr=$P(R,D,2) . Set SortKey="0000" // default sortkey @@ -594,6 +595,7 @@ . . Else Set:LEVNr=$$$LevHalux SortKey = ProductieService.GeefCategorie(Product.GeefID())_" "_ProductieService.GeefProductieGroep(KlantID,Product.GeefID()) . Else Set SortKey=$G(LastSortKey) . Set:'$L(SortKey) SortKey="0000" + . // Ad hoc splitsing van bvb. specifieke te grote toeleveringen kan gebeuren door hier aan SortKey iets te appenden, zoals een kenmerk van een lade. . If 'PRNr,'$D(arSplit(SortKey)) Set arSplit("~~~~",TLNr)="" Quit ; Tekst eventueel op wacht zetten voor bij eerstvolgende productgroep . Merge arSplit(SortKey)=arSplit("~~~~") Kill arSplit("~~~~") ; Wachtende lijnen toevoegen . Set arSplit(SortKey,TLNr)="" @@ -618,6 +620,7 @@ . Set ^KTO2(LEVNr,NTOENr)="" . If LEVNr=5005 S ^BLBeri("Z",NTOENr)=LEVNr_D . Do ##class(DOM.AKP.event.ToeleveringEventRaiser).RaiseToeleveringGemaaktEvent(NTOENr) + . // Algemeen automatisch splitsen van te grote LBX toeleveringen zou hier kunnen, � la Do SplitHaluxProd(NTOENr,?,/*BeperkOpGrootte=*/$$$True) Quit ;