Index: AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevDixfConverter.cls.xml =================================================================== diff -u -r42650 -r42792 --- AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevDixfConverter.cls.xml (.../AankoopPrijzenLevDixfConverter.cls.xml) (revision 42650) +++ AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevDixfConverter.cls.xml (.../AankoopPrijzenLevDixfConverter.cls.xml) (revision 42792) @@ -14,6 +14,11 @@ 1 + +%String +1 + + AXdixf.AankoopPrijzenLev.AankoopPrijzenLev 1 @@ -29,6 +34,11 @@ 1 + +AXimpl.Utils +1 + + AX.Uitgaand.PM.impl.Convertor.Sopr.AxProduct 1 @@ -48,6 +58,7 @@ Set ..BlumKundeOmzetter = ##class(AX.Uitgaand.PM.impl.Convertor.Sopr.BlumKunde).%New() Set ..ConvertorLeveranciersnummerVanHoeckeNaarHalux = ##class(AX.Uitgaand.PM.impl.Convertor.ConvertorLeveranciersnummerVanHoeckeNaarHalux).%New() Set ..SoprConvertor = ##class(AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor).%New() + Set ..PrimaryVendorIdBepaler = ##class(AXimpl.Utils).%New() Quit $$$OK ]]> @@ -127,15 +138,12 @@ #dim AccountRelation As %String #dim LeverancierNummer As %String = Product.Basis.LeverancierNummer - If Vestiging = ##class(AXimpl.InterneFirmaInitialen).HaluxNv() { - Set LeverancierNummer = ..ConvertorLeveranciersnummerVanHoeckeNaarHalux.ConvertorLeveranciersnummerVanHoeckeNaarHalux(LeverancierNummer) - } + Do ..BepaalPrimaryVendorId(Product,Vestiging) + Set AccountRelation = ..PrimaryVendorId - Set AccountRelation = ##class(TECH.StringUtils).AddLeadingChar(LeverancierNummer,"0",5) - - If ..IsBlumProduct { - If (..SoprAxProduct.HeeftVervangSoprPRNr = $$$True) { - Set AccountRelation = ..BepaalLeverancierVolgensBlumKunde() + If Vestiging = ##class(AXimpl.InterneFirmaInitialen).VanHoeckeNv() { + If ..IsBlumProduct { + Set AccountRelation = ..BepaalLeverancierVolgensBlumKunde() }} Quit AccountRelation @@ -239,6 +247,16 @@ Quit LeverancierVolgensBlumKunde ]]> + + +Product:AX.Uitgaand.PM.Product.impl.Product,Vestiging:AXimpl.InterneFirmaInitialen +1 + + Index: AXimpl/Utils.cls.xml =================================================================== diff -u -r42618 -r42792 --- AXimpl/Utils.cls.xml (.../Utils.cls.xml) (revision 42618) +++ AXimpl/Utils.cls.xml (.../Utils.cls.xml) (revision 42792) @@ -153,7 +153,7 @@ If Firma = ##class(AXimpl.InterneFirmaInitialen).VanHoeckeNv() { #dim PrimaryVendorIdVH As %String = "" If (DefaultOrderType = "Productie") { - Set PrimaryVendorIdVH = "" + Set PrimaryVendorIdVH = "06051" } ElseIf ((LinkType = "HH") || (LinkType = "HHZ")) { Set PrimaryVendorIdVH = "06332" Index: AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevKortingDixfConverter.cls.xml =================================================================== diff -u -r42655 -r42792 --- AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevKortingDixfConverter.cls.xml (.../AankoopPrijzenLevKortingDixfConverter.cls.xml) (revision 42655) +++ AX/Uitgaand/PM/AankoopPrijzenLev/impl/AankoopPrijzenLevKortingDixfConverter.cls.xml (.../AankoopPrijzenLevKortingDixfConverter.cls.xml) (revision 42792) @@ -14,6 +14,11 @@ 1 + +%String +1 + + AXdixf.AankoopPrijzenLev.AankoopPrijzenLev 1 @@ -29,6 +34,11 @@ 1 + +AXimpl.Utils +1 + + AX.Uitgaand.PM.impl.Convertor.Sopr.AxProduct 1 @@ -48,6 +58,7 @@ Set ..BlumKundeOmzetter = ##class(AX.Uitgaand.PM.impl.Convertor.Sopr.BlumKunde).%New() Set ..ConvertorLeveranciersnummerVanHoeckeNaarHalux = ##class(AX.Uitgaand.PM.impl.Convertor.ConvertorLeveranciersnummerVanHoeckeNaarHalux).%New() Set ..SoprConvertor = ##class(AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor).%New() + Set ..PrimaryVendorIdBepaler = ##class(AXimpl.Utils).%New() Quit $$$OK ]]> @@ -127,15 +138,12 @@ #dim AccountRelation As %String #dim LeverancierNummer As %String = Product.Basis.LeverancierNummer - If Vestiging = ##class(AXimpl.InterneFirmaInitialen).HaluxNv() { - Set LeverancierNummer = ..ConvertorLeveranciersnummerVanHoeckeNaarHalux.ConvertorLeveranciersnummerVanHoeckeNaarHalux(LeverancierNummer) - } + Do ..BepaalPrimaryVendorId(Product,Vestiging) + Set AccountRelation = ..PrimaryVendorId - Set AccountRelation = ##class(TECH.StringUtils).AddLeadingChar(LeverancierNummer,"0",5) - - If ..IsBlumProduct { - If (..SoprAxProduct.HeeftVervangSoprPRNr = $$$True) { - Set AccountRelation = ..BepaalLeverancierVolgensBlumKunde() + If Vestiging = ##class(AXimpl.InterneFirmaInitialen).VanHoeckeNv() { + If ..IsBlumProduct { + Set AccountRelation = ..BepaalLeverancierVolgensBlumKunde() }} Quit AccountRelation @@ -209,6 +217,16 @@ Quit LeverancierVolgensBlumKunde ]]> + + +Product:AX.Uitgaand.PM.Product.impl.Product,Vestiging:AXimpl.InterneFirmaInitialen +1 + + Index: vhUnitTest/AXimpl/Utils/ConvertPrimaryVendorId/Test.cls.xml =================================================================== diff -u -r42590 -r42792 --- vhUnitTest/AXimpl/Utils/ConvertPrimaryVendorId/Test.cls.xml (.../Test.cls.xml) (revision 42590) +++ vhUnitTest/AXimpl/Utils/ConvertPrimaryVendorId/Test.cls.xml (.../Test.cls.xml) (revision 42792) @@ -61,7 +61,7 @@ #dim PrimaryVendorId As %String = Converter.ConvertPrimaryVendorId(Firma,AxProduct) - Do $$$AssertEquals(PrimaryVendorId,"") + Do $$$AssertEquals(PrimaryVendorId,"06051") ]]>