Index: AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevDixfConverter.cls.xml =================================================================== diff -u -r41663 -r42538 --- AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevDixfConverter.cls.xml (.../ExtArtOmschrLevDixfConverter.cls.xml) (revision 41663) +++ AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevDixfConverter.cls.xml (.../ExtArtOmschrLevDixfConverter.cls.xml) (revision 42538) @@ -3,7 +3,7 @@ TECH.RegisteredObject - + %String 1 @@ -13,8 +13,8 @@ 1 - -%String + +AX.Uitgaand.PM.impl.SamenstellingBestelreferentieProductenInEenString 1 @@ -23,13 +23,18 @@ 1 - -AX.Uitgaand.PM.impl.SamenstellingBestelreferentieProductenInEenString + +AXimpl.Utils 1 + +AXimpl.InterneFirmaInitialen +1 + + -Vestiging:%String,LeverancierNummer:%String="" +Vestiging:%String,LeverancierNummer:%String="",Utils:AXimpl.Utils 1 1 %Status @@ -38,6 +43,7 @@ Set ..Vestiging = Vestiging Set ..LeverancierNummer = LeverancierNummer Set ..BestelreferentieSamensteller = ##class(AX.Uitgaand.PM.impl.SamenstellingBestelreferentieProductenInEenString).%New() + Set ..Utils = $$$Inject(Utils,##class(AXimpl.Utils).%New()) Quit $$$OK ]]> @@ -59,15 +65,15 @@ Set ..Product = ##class(AX.Uitgaand.PM.Product.impl.Product).%New(ProductID) Do ..GeefLeverancierNummer() - If ..Vestiging = "VanHoecke" { + If ..Vestiging = ##class(AXimpl.InterneFirmaInitialen).VanHoeckeNv() { Do ..ConvertVanHoecke() } Else { - If ..Vestiging = "Halux" { + If ..Vestiging = ##class(AXimpl.InterneFirmaInitialen).HaluxNv() { Do ..ConvertHalux() } Else { - Write !,"Geef als parameter ofwel VanHoecke, ofwel Halux mee!" + Write !,"Geef als parameter ofwel VHBE, ofwel HLX mee! Huidige parameter is: "_..Vestiging } } Set ..LeverancierNummer = "" @@ -88,7 +94,7 @@ Set AxProduct.ModuleType = "03" // OPGELET: Volgende "Set AxProduct"-lijnen zijn niet nodig voor AX, maar kunnen gebruikt worden ter controle: - Set AxProduct.DefaultOrderType = ..BepaalDefaultOrderTypeVH() + Set AxProduct.DefaultOrderType = ..Utils.ConvertDefaultOrderType(..Vestiging,..Product) Set AxProduct.LeverancierNummer = ..Product.Basis.LeverancierNummer Set AxProduct.LinkType = ..Product.Basis.LinkType @@ -110,7 +116,7 @@ Set AxProduct.ModuleType = "03" // OPGELET: Volgende "Set AxProduct"-lijnen zijn niet nodig voor AX, maar kunnen gebruikt worden ter controle: - Set AxProduct.DefaultOrderType = ..BepaalDefaultOrderTypeHLX() + Set AxProduct.DefaultOrderType = ..Utils.ConvertDefaultOrderType(..Vestiging,..Product) Set AxProduct.LeverancierNummer = ..Product.Basis.LeverancierNummer Set AxProduct.LinkType = ..Product.Basis.LinkType @@ -151,39 +157,6 @@ Quit CustVendRelationHLX ]]> - - -1 -%String - - - - -1 -%String - - Index: AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevIterator.cls.xml =================================================================== diff -u -r41661 -r42538 --- AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevIterator.cls.xml (.../ExtArtOmschrLevIterator.cls.xml) (revision 41661) +++ AX/Uitgaand/PM/ExtArtOmschrLev/impl/ExtArtOmschrLevIterator.cls.xml (.../ExtArtOmschrLevIterator.cls.xml) (revision 42538) @@ -28,8 +28,13 @@ 1 + +AXimpl.Utils +1 + + -%String +AXimpl.InterneFirmaInitialen 1 @@ -44,14 +49,15 @@ -QueryAPI:TECH.Query.QueryAPI="",Vestiging:%String +QueryAPI:TECH.Query.QueryAPI="",Vestiging:%String,Utils:AXimpl.Utils 1 1 %Status 1 1 0)) { Set ..Product = ##class(AX.Uitgaand.PM.Product.impl.Product).%New(..ResultSet.GetData(1)) - If (..ResultSet.GetData(1) = "") { - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Leeg uit Resultset : '"_..ResultSet.GetData(1)_"' .")) - } - If $$$Not($IsObject(..Product.Basis)) { - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Product bestaat niet : '"_..ResultSet.GetData(1)_"' .")) - } Set ..LeverancierNummer = ..Product.Basis.LeverancierNummer - - Do ..BepaalDefaultOrderType() + Set ..DefaultOrderType = ..Utils.ConvertDefaultOrderType(..Vestiging,..Product) Do ..BepaalMoetUitgeslotenWorden() Set TeOutputtenProductGevonden = $$$Not(..MoetUitgeslotenWorden) } @@ -120,62 +119,13 @@ ]]> - -1 -%String - - - - -1 -%String - - - - -1 -%String - - - Vestiging:%String