1 TECH.RegisteredObject DOM.PM.ProductAPI 1 DOM.PM.impl.LangtekstBewaarderPieces 1 %Status Produceert een orgaluxproduct waarvan 1 van de kinderen (InTeKortenPRNr) op maat te maken is. OrgaluxProduct:DOM.PM.OLProduct.OLProduct,InbouwBreedte:%Integer,KlantID:DOM.VKP.VanHoeckeKlantID DOM.PM.OLProduct.OLProduct = BreedteOLProduct) { Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException).%New(##class(TECH.enu.ExceptionCode).InvalidInput(),"De inbouwbreedte mag niet groter zijn dan het ORGALUX product")) } // Kopiƫren van het orgalux product Set PRNr = ..ProductAPI.KopieerProduct(OrgaluxProduct) // Productobject zelf niet bewaren omdat prijzen en samenstelling toch gaan wijzigen #Dim IngekortProduct As DOM.PM.Product Do ..VervangBouwstenen(OrgaluxProduct, PRNr, TeVervangenKinderen, TeVervangenProduct, InTeKortenNaar, KlantID, .IngekortProduct) Do ..StelInAdministratieveVelden(OrgaluxProduct, PRNr, TeVervangenProduct, InTeKortenNaar, KlantID, InbouwBreedte, IngekortProduct) Do RECALC^PRODUKT2(PRNr) Do BLDIND^PRODUKT2(PRNr) Do ..HerrekenHetOrgaluxProductMetDeToeslag( PRNr ) Do Gewijzigd^PRODUKT2(PRNr) Do Gewijzigd^PRODUKT2(IngekortProduct.GeefID()) #dim IngekortOrgaluxProduct As DOM.PM.Product = ..ProductAPI.GeefProduct(PRNr) Do IngekortOrgaluxProduct.ZetBarcodeWaarde("") Do IngekortOrgaluxProduct.Save() Quit IngekortOrgaluxProduct ]]> 1 OrgaluxProduct,PRNr,TeVervangenProduct,InTeKortenNaar,KlantID,InbouwBreedte,IngekortProduct:DOM.PM.Product 1 PRNr:%String 1 PRNr:%String 1 1 TeVervangenProduct:DOM.PM.Product,BreedteOLProduct:%Integer %Integer 1 %Float OrgaluxProduct:DOM.PM.OLProduct.OLProduct,InbouwBreedte:%Integer,IngekortProduct:DOM.PM.Product %String OrgaluxProduct:DOM.PM.OLProduct.OLProduct %Integer InTeKortenProduct:DOM.PM.Product,TeVervangenProduct:DOM.PM.Product,TeBekomenLengte:%Integer,Aantal:%Integer,KlantID:DOM.VKP.VanHoeckeKlantID 1 DOM.PM.Product PRNr:%Integer,InbouwBreedte:%Integer OrgaluxProduct:DOM.PM.OLProduct.OLProduct 1) { Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException).%New(##class(TECH.enu.ExceptionCode).InvalidInput(),"Er zijn meerdere te vervangen producten in dit orgalux product")) } ElseIf (TeVervangenKinderen.Count() = 0) { Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException).%New(##class(TECH.enu.ExceptionCode).InvalidInput(),"Er zijn geen te vervangen producten in dit orgalux product")) } Set InTeKortenKinderen = InkortInfo.GeefInTeKortenKinderen() If (InTeKortenKinderen.Count() > 1) { Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException).%New(##class(TECH.enu.ExceptionCode).InvalidInput(),"Er zijn meerdere in te korten producten in dit orgalux product")) } ElseIf (InTeKortenKinderen.Count() = 0) { Do ##class(TECH.ExceptionHandler).Throw(##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException).%New(##class(TECH.enu.ExceptionCode).InvalidInput(),"Er zijn geen in te korten producten in dit orgalux product")) } ]]>