Index: INKORTBAAR.mac.rou =================================================================== diff -u -r921 -r1024 --- INKORTBAAR.mac.rou (.../INKORTBAAR.mac.rou) (revision 921) +++ INKORTBAAR.mac.rou (.../INKORTBAAR.mac.rou) (revision 1024) @@ -3,31 +3,40 @@ INKORTBAAR ;Produkt creatie voor zaagsnedes GENERATE(Ref,GenPRNr,Params,FromPRNr) - New %SC,%SelProd,sFL,IngekortPRNr,KLNr,LEVNr,Taal,KortTxt,PR,LT,InbouwBreedte,OLProductInTeKorten,Factory,Product - Set Ref=$G(Ref),(GenPRNr,PR)=$G(GenPRNr),Params=$G(Params),FromPRNr=$G(FromPRNr),InbouwBreedte="" + New %SC,%SelProd,sFL,IngekortPRNr,KLNr,LEVNr,Taal,KortTxt,PR,LT,Binnenmaat,OLProductInTeKorten,Factory,Product + Set Ref=$G(Ref),(GenPRNr,PR)=$G(GenPRNr),Params=$G(Params),FromPRNr=$G(FromPRNr),Binnenmaat="" Set:Params="K" KLNr=Ref Set:Params="L" LEVNr=Ref,IsStock=1 If Params="",GenPRNr Do . Set R=$O(^KPR(GenPRNr,"J")) . Quit:$E(R)'="J" . Set R=^KPR(GenPRNr,R),LEVNr=$P(R,D) Set Taal=$G(KT) - Do NIEUW^vhScherm("INKORTBAAR",,,,,,3) - If %SC Do - . Set OLProductInTeKorten = ##class(DOM.DomeinContext).Instance().GeefProductAPI().GeefProduct(FromPRNr) - . Set Factory = ##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatFactory).%New() - . Set Product = Factory.GeefOrgaluxOpMaat(OLProductInTeKorten, InbouwBreedte) - . Set IngekortPRNr = Product.GeefPRNr() + For Do Quit:'%SC Quit:$G(IngekortPRNr) + . Do NIEUW^vhScherm("INKORTBAAR",,,,,,3) + . If %SC Do + . . Set OLProductInTeKorten = ##class(DOM.DomeinContext).Instance().GeefProductAPI().GeefProduct(FromPRNr) + . . Set Factory = ##class(APPS.PM.Maatwerk.OLM.OrgaluxOpMaatFactory).%New() + . . Set $ZTRAP="ErrorHandler^INKORTBAAR" + . . Set Product = Factory.GeefOrgaluxOpMaat(OLProductInTeKorten, Binnenmaat) + . . Set $ZTRAP="" + . . Set IngekortPRNr = Product.GeefPRNr() Quit $G(IngekortPRNr) ; Basisproduct selecteren FROMPRNR(FromPRNr) - New R,X,IsInkortbaar + New R,X If '$G(FromPRNr) Do . Do STORE^vhTERMINA() - . For Set FromPRNr=$$SELECT^PRODUKT6("KL",837,,"Basisprodukt : ") Quit:'FromPRNr Do Quit:IsInkortbaar - . . Set IsInkortbaar=##Class(APPS.PM.OL.impl.OrgaluxProduct).IsInkortbaar(FromPRNr) - . . If 'IsInkortbaar Do WARN^vhTXTPOP("Product """_$P(^KPR(FromPRNr,0),D)_""" is niet inkortbaar!","") + . Set FromPRNr=$$SELECT^PRODUKT6("KL",837,,"Basisprodukt : ") . Do REFRESH^vhTERMINA() Quit FromPRNr ; +ErrorHandler + Set $ZTRAP="" + New Exception,ProbleemOmschrijving + Set Exception=##class(TECH.ExceptionHandler).Catch("APPS.PM.Maatwerk.OLM.OrgaluxOpMaatException") + Set ProbleemOmschrijving=Exception.GeefOmschrijving() + Do WARN^vhTXTPOP(ProbleemOmschrijving,"") + Quit + ; \ No newline at end of file