Index: AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter.cls.xml =================================================================== diff -u -r47622 -r47688 --- AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter.cls.xml (.../ProductItemConverter.cls.xml) (revision 47622) +++ AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter.cls.xml (.../ProductItemConverter.cls.xml) (revision 47688) @@ -3,6 +3,11 @@ TECH.Mockable + +%Integer +5 + + DOM.PM.ProductAPI 1 @@ -150,12 +155,12 @@ Set Klas = KlasIterator.Next() } else { ;Fallback Klas ophalen en toekennen + mail/log etc. - Set KlasIterator = ..KlasRepository.ZoekViaGroepen("AX","AX1","AX2/AX") - if $$$Not(KlasIterator.HasNext()){ - Do ..Logger.ErrorMail("Productsynchronizatie AX - Admin","Fallback klassificatie groepen zijn niet gedefinieerd in Admin (^KLAS)") + #dim FallbackKlasTterator as TECH.Iterator = ..KlasRepository.ZoekViaGroepen("AX","AX1","AX2/AX") + if $$$Not(FallbackKlasTterator.HasNext()){ + Do ..Logger.Error("Productsynchronizatie AX - Admin","Fallback klassificatie groepen zijn niet gedefinieerd in Admin (^KLAS)") Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Productsynchronizatie AX - Admin : Fallback klassificatie groepen zijn niet gedefinieerd in Admin")) } else { - Set Klas = KlasIterator.Next() + Set Klas = FallbackKlasTterator.Next() Do ..StuurOntbrekendeKLASMail(ProductItem.ItemId,$Piece(SubGroep,"-",1),$Piece(SubGroep,"-",2),$Piece(SubGroep,"-",3)) } } @@ -387,7 +392,7 @@ #dim Extradagen = ##class(AXimpl.AxToAdminUtils).GeefExtraLeveringsDagen(LeverancierNummer,StockNietStock) ; werkdagen naar weken afronden naar boven - Quit ##class(TECH.Math).Ceil((ProductItem.LeadTimePurch-Extradagen)/ 5) + Quit ##class(TECH.Math).Ceil((ProductItem.LeadTimePurch-Extradagen)/ ..#DagenPerWeek) ]]> @@ -538,8 +543,7 @@ #Dim MeldingTekst as %String = "Voor product '" _ ItemId _ "' bestaan de klassificatie groepen '" _ HoofdGroep _"' - '"_ Groep _"' - '"_ SubGroep _"' - " _ " nog niet in Admin" Do Mail.ZetInhoud("Beste,"_ $$$CRLF _ $$$CRLF _ MeldingTekst) Do ..MailAPI.VerstuurMail(Mail) - - Do ..Logger.Warning("Productsynchronizatie AX - Admin",MeldingTekst_$$$CRLF_"PM is verwittigd, geen actie nodig") + Do ..Logger.Warning("Productsynchronizatie AX - Admin","Geen actie nodig, PM is verwittigd van :" _$$$CRLF _ MeldingTekst,0) ]]> Index: vhUnitTest/AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter/MappingTest.cls.xml =================================================================== diff -u -r47622 -r47688 --- vhUnitTest/AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter/MappingTest.cls.xml (.../MappingTest.cls.xml) (revision 47622) +++ vhUnitTest/AXimpl/Dynamics/ProductItemUpsertIn/Converter/ProductItemConverter/MappingTest.cls.xml (.../MappingTest.cls.xml) (revision 47688) @@ -114,7 +114,7 @@ ]]> - +