Index: FLOWTOE3.mac.rou =================================================================== diff -u -r54795 -r58116 --- FLOWTOE3.mac.rou (.../FLOWTOE3.mac.rou) (revision 54795) +++ FLOWTOE3.mac.rou (.../FLOWTOE3.mac.rou) (revision 58116) @@ -578,14 +578,18 @@ SplitHaluxProd(TOENr,NTLNr) New R,LEVNr,TLNr,NTOENr,LCount, TLUNr,PRNr,OrderLijnVolgnummer New arSplit,SortKey,LastSortKey,Leverdag - new Toelevering, KlantID,Product,ProductAPI + new Toelevering, KlantID,Product,ProductAPI,AantalLadesVoorBewerkingsCenterBepaler,HeeftGrootAantalInToelevering + new ProductieService set ProductieService = ##class(APPS.Halux.common.ProductieService).%New() set ProductAPI = ##class(DOM.DomeinContext).Instance().GeefProductAPI() set Toelevering = ##class(DOM.DomeinContext).Instance().GeefToeleveringAPI().GeefToelevering(TOENr) + Set AantalLadesVoorBewerkingsCenterBepaler = ##class(BL.Legacy.AantalLadesVoorBewerkingsCenterBepaler).%New() + Set HeeftGrootAantalInToelevering = AantalLadesVoorBewerkingsCenterBepaler.HeeftGrootAantalInToelevering(TOENr) + 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. + // 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),OrderLijnVolgnummer=$P(R,D,28) . Set SortKey="0000" // default sortkey @@ -598,7 +602,7 @@ . . Else Do . . . If LEVNr=$$$LevHalux Do . . . . Set Leverdag = ##class(BL.Legacy.FLOWTOE).GeefLeverdag(Toelevering,TLNr) - . . . . Set:($Length(Leverdag)) SortKey = ProductieService.GeefCategorie(Product.GeefID())_" "_ProductieService.GeefProductieGroep(KlantID,Product.GeefID())_" "_Leverdag + . . . . Set:($Length(Leverdag)) SortKey = ProductieService.GeefCategorie(Product.GeefID())_" "_ProductieService.GeefProductieGroep(KlantID,Product.GeefID(),HeeftGrootAantalInToelevering)_" "_Leverdag . . . . If ##class(BL.Legacy.FLOWTOE).IsToeleveringLijnVoorSpaceTowerProduct(Toelevering,TLNr) Set SortKey = OrderLijnVolgnummer . .