Index: APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/RollenEnStuklijstOptiesGenerator.cls.xml =================================================================== diff -u -r72362 -r73947 --- APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/RollenEnStuklijstOptiesGenerator.cls.xml (.../RollenEnStuklijstOptiesGenerator.cls.xml) (revision 72362) +++ APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/OptieGenerator/RollenEnStuklijstOptiesGenerator.cls.xml (.../RollenEnStuklijstOptiesGenerator.cls.xml) (revision 73947) @@ -34,7 +34,8 @@ Set Opties = ##class(%ListOfObjects).%New() #dim SequentieNummerLade = UitvoeringInfo.SequentieNummerLade - #dim Product As DOM.PM.MaatwerkProduct = ..ProductApi.GeefProduct(UitvoeringInfo.ProductID) + #dim ProductID As %String = UitvoeringInfo.ProductID + #dim Product As DOM.PM.MaatwerkProduct = ..ProductApi.GeefProduct(ProductID) #dim IngegevenKenmerken As DOM.PM.Maatwerk.Calc.Common.IngegevenKenmerken = Product.GeefIngegevenKenmerken() #dim HalffabItemsBoom As DOM.PM.Maatwerk.Calc.HF.HalffabItemsBoom = Product.GeefHalffabItemsBoom() #dim HalffabItemsIterator As TECH.Iterator = HalffabItemsBoom.GeefAlleHalffabItemsIterator() @@ -51,6 +52,33 @@ } } + //Voeg extra bouwstenen toe (gekenmerkt door $X$ in bouwstenen) + #dim HuidigeActieveMESFase = ##class(TECH.Config.ConfigMgr).Instance().GeefString("APPS.Halux.PPS.Document.impl.BatchNaarObjective_MESFase") + If (HuidigeActieveMESFase >= 2) { + #dim LosOnderdeelNummer = 1 + #dim BSKey As %String = "" + #dim HalffabProductId As %String = "" + #dim HalffabAantal As %Decimal = "" + #dim OBJTIdentNummer As %String = "" + #dim IdentNummer As %String = "" + #dim RolNaam As %String = "" + For Set BSKey=$Order(^PRBS("BS",ProductID,BSKey)) Quit:BSKey="" Do + . Quit:$Piece(^PRBS("BS",ProductID,BSKey),"\",11)'="$X$" + . Set HalffabProductId = $Piece(^PRBS("BS",ProductID,BSKey),"\",1) + . Set HalffabAantal = $Piece(^PRBS("BS",ProductID,BSKey),"\",2) + . If HalffabAantal > 0 Do + . . Set RolNaam = "SPTLoosePart" _ LosOnderdeelNummer + . . Do Opties.Insert(..GeefOptieVoorLade(SequentieNummerLade, "-ROL-"_ RolNaam, ..ConverteerWaarde(HalffabAantal, "%Decimal"))) + . . Set IdentNummer = ..ProductApi.GeefIdentNummerVoorProductId(HalffabProductId) + . . Set OBJTIdentNummer = ..OBJTIdentLookupService.GeefOBJTIdentNr(IdentNummer) + . . Do Opties.Insert(..GeefOptieVoorLade(SequentieNummerLade, "-INPUT[" _ ..PrependNul($Increment(Index), 2) _ "]|QTY|ROL", OBJTIdentNummer _ "|"_ ##class(TECH.Math).Round(HalffabAantal, 4) _ "|" _ RolNaam)) + . Set LosOnderdeelNummer = LosOnderdeelNummer + 1 + + If (LosOnderdeelNummer > 8) { + #dim Logger = ##class(vhLib.Logger).%New("RollenEnStuklijstOptiesGenerator").ErrorMail("Er zijn meer extra spacetowerrollen dan geconfigureerd in Objective. Er is dus een uitbreiding nodig in Objective en een aanpassing in deze error.") + } + } + Quit Opties ]]>