Index: vhTest/Mock/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml
===================================================================
diff -u -r41065 -r41148
--- vhTest/Mock/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml (.../OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml) (revision 41065)
+++ vhTest/Mock/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml (.../OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml) (revision 41148)
@@ -15,12 +15,6 @@
-
-
-%ListOfDataTypes
-
-
Index: vhUnitTest/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur/Test.cls.xml
===================================================================
diff -u -r41081 -r41148
--- vhUnitTest/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur/Test.cls.xml (.../Test.cls.xml) (revision 41081)
+++ vhUnitTest/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur/Test.cls.xml (.../Test.cls.xml) (revision 41148)
@@ -5,18 +5,21 @@
").DanDoeNiks()
+ Do MailMock.VerwachtMethodCall("ZetVerzender","""BLUM OPC"" ").DanDoeNiks()
+ Do MailMock.VerwachtMethodCall("VoegToeOntvanger", "OV_weborder_R09").DanDoeNiks()
Do MailMock.VerwachtMethodCall("ZetIsHTML","0").DanDoeNiks()
Do MailMock.VerwachtMethodCall("ZetOmleiden","0").DanDoeNiks()
#dim VerwachteInhoud As %String = "Er zijn fouten opgetreden bij het opzoeken van producten!" _$$$CRLF
- Set VerwachteInhoud = VerwachteInhoud _"KlantID : KlantID" _$$$CRLF
+ Set VerwachteInhoud = VerwachteInhoud _"KlantNaam : DE NAAM" _$$$CRLF
+ Set VerwachteInhoud = VerwachteInhoud _"KlantNummer : 1234" _$$$CRLF
Set VerwachteInhoud = VerwachteInhoud _"Email : UserName" _$$$CRLF _$$$CRLF
Set VerwachteInhoud = VerwachteInhoud _"identNummer Foutmelding" _$$$CRLF _$$$CRLF
@@ -27,7 +30,7 @@
Do MailAPIMock.VerwachtMethodCall("VerstuurMail", MailMock).DanDoeNiks()
Set Rapporteur = ##class(APPS.Blum.impl.OnlineProductConfiguratorService.Rapporteur).%New(MailAPIMock)
- Do Rapporteur.MailMeldingenNaarOV(Meldingen,"UserName","KlantID")
+ Do Rapporteur.MailMeldingenNaarOV(Meldingen, "UserName", VanHoeckeKlant)
Do MailAPIMock.Verifieer()
Do MailMock.Verifieer()
Index: APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml
===================================================================
diff -u -r41079 -r41148
--- APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41079)
+++ APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41148)
@@ -22,28 +22,33 @@
-Meldingen:%ListOfDataTypes,UserName:%String,KlantID:%String
+Meldingen:%ListOfDataTypes,UserName:%String,Klant:DOM.VKP.VanHoeckeKlant
0) {
+
+ #dim MailToPrefix As %String = ##class(TECH.Config.ConfigMgr).Instance().GeefString("APPS.OV.impl.OrderVerwerkingInteracties.OfferteBesteld_MailToPrefix")
+ #dim MailTo As %String = MailToPrefix _ ##class(TECH.StringUtils).AddLeadingChar(Klant.GeefRegio(), "0", 2)
+
#dim Mail As TECH.Mail.Mail = ..MailAPI.MaakNieuwMail()
Do Mail.ZetOnderwerp("BLUM OPC - meldingen bij het verwerken van een winkelkar.")
- Do Mail.ZetVerzender("BLUMOPC@vanhoecke.be")
- Do Mail.VoegToeOntvanger($$$SystemMail("OV"))
+ Do Mail.ZetVerzender($$$SystemMail("BLUM OPC"))
+ Do Mail.VoegToeOntvanger(MailTo)
Do Mail.ZetIsHTML($$$False)
- Do Mail.ZetInhoud(..MaakMailInhoud(Meldingen, UserName, KlantID))
+ Do Mail.ZetInhoud(..MaakMailInhoud(Meldingen, UserName, Klant))
Do Mail.ZetOmleiden($$$False)
Do ..MailAPI.VerstuurMail(Mail)
}
]]>
-Meldingen:%ListOfDataTypes,UserName:%String,KlantID:%String
+Meldingen:%ListOfDataTypes,UserName:%String,Klant:DOM.VKP.VanHoeckeKlant
1
%String
+
+
+
+
+
+
+
+
+
+1
+TECH.Exceptions.InvalidInputException
+
+
+
1
APPS.Blum.OnlineProductConfigurator.dto.Winkelkar
Index: APPS/Blum/impl/OnlineProductConfiguratorService.cls.xml
===================================================================
diff -u -r41085 -r41148
--- APPS/Blum/impl/OnlineProductConfiguratorService.cls.xml (.../OnlineProductConfiguratorService.cls.xml) (revision 41085)
+++ APPS/Blum/impl/OnlineProductConfiguratorService.cls.xml (.../OnlineProductConfiguratorService.cls.xml) (revision 41148)
@@ -23,6 +23,11 @@
1
+
+TECH.Config.ConfigMgr
+1
+
+
KlantBepaler:APPS.Blum.impl.OnlineProductConfigurator.KlantBepaler,FlowOfferteConverteerder:APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarFlowOfferteConverteerder,Vhisie4WinkelkarConverteerder:APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder,Rapporteur:APPS.Blum.impl.OnlineProductConfiguratorService.Rapporteur
1
@@ -34,7 +39,8 @@
Set ..FlowOfferteConverteerder = $$$Inject(FlowOfferteConverteerder, ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarFlowOfferteConverteerder).%New())
Set ..Vhisie4WinkelkarConverteerder = $$$Inject(Vhisie4WinkelkarConverteerder, ##class(APPS.Blum.impl.OnlineProductConfigurator.OPCWinkelkarNaarVhisie4WinkelkarConverteerder).%New())
Set ..Rapporteur = $$$Inject(Rapporteur, ##class(APPS.Blum.impl.OnlineProductConfiguratorService.Rapporteur).%New())
-
+ Set ..ConfigMgr = ##class(TECH.Config.ConfigMgr).Instance()
+
quit $$$OK
]]>
@@ -51,26 +57,70 @@
APPS.Blum.OnlineProductConfigurator.dto.Webshop
+
+
+
+UserCart:APPS.Blum.OnlineProductConfigurator.dto.Winkelkar,Klant:APPS.Blum.OnlineProductConfigurator.dto.Klant
+1
+APPS.Blum.OnlineProductConfigurator.dto.Webshop
+
+
+
+
+UserCart:APPS.Blum.OnlineProductConfigurator.dto.Winkelkar,Klant:APPS.Blum.OnlineProductConfigurator.dto.Klant
+1
+APPS.Blum.OnlineProductConfigurator.dto.Webshop
+
+
+
+InnerExcepties:TECH.ExceptionList
+1
+%ListOfDataTypes
+
+
Index: APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml
===================================================================
diff -u -r41105 -r41148
--- APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml (.../OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml) (revision 41105)
+++ APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml (.../OPCWinkelkarNaarVhisie4WinkelkarConverteerder.cls.xml) (revision 41148)
@@ -54,7 +54,7 @@
-%ListOfDataTypes
+TECH.ExceptionList
1
@@ -79,7 +79,7 @@
Winkelkar:APPS.Blum.OnlineProductConfigurator.dto.Winkelkar,Klant:DOM.VKP.VanHoeckeKlant
%String
-
+
1
0) {
- ; Set Exception = ##class(TECH.Exceptions.InvalidInputException).%New("Blum OPC - Er is een fout opgetreden bij het bewaren van de winkelkar voor gebruiker " _..Winkelkar.userName _"!")
- ; do ##class(TECH.ExceptionHandler).Throw(Exception)
- ;}
+ If (..Meldingen.Count() > 0) {
+ Set Exception = ##class(TECH.Exceptions.InvalidInputException).%New("Blum OPC - Er zijn niet verwerkte producten bij het bewaren van de winkelkar voor gebruiker " _..Winkelkar.userName _"!")
+ Do Exception.ZetInnerExcepties(..Meldingen)
+ do ##class(TECH.ExceptionHandler).Throw(Exception)
+ }
]]>
@@ -214,16 +215,10 @@
Do ..Vhisie4Winkelkar.Lijnen.Insert(Vhisie4ProductLijn)
} catch {
#dim Exception As TECH.IException = ##class(TECH.ExceptionHandler).Catch()
- Do ..Meldingen.Insert("IdentNr " _IdentNr _" is niet verwerkt. " _Exception.GeefOmschrijving())
+ Do ..Meldingen.Insert(##class(TECH.Exceptions.InvalidInputException).%New("IdentNr " _IdentNr _" is niet verwerkt. " _Exception.GeefOmschrijving()))
}
]]>
-
-
-%ListOfDataTypes
-
-
Index: vhTest/Mock/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml
===================================================================
diff -u -r41079 -r41148
--- vhTest/Mock/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41079)
+++ vhTest/Mock/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41148)
@@ -10,8 +10,8 @@
right
-Meldingen:%ListOfDataTypes,UserName:%String,KlantID:%String
-Meldingen:%ListOfDataTypes,UserName:%String,Klant:DOM.VKP.VanHoeckeKlant
+
Index: vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml
===================================================================
diff -u -r41065 -r41148
--- vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 41065)
+++ vhUnitTest/APPS/Blum/impl/OnlineProductConfigurator/OPCWinkelkarNaarVhisie4WinkelkarConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 41148)
@@ -163,7 +163,7 @@
]]>
-
+
+
+
+
+
Index: vhTest/Fake/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml
===================================================================
diff -u -r41079 -r41148
--- vhTest/Fake/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41079)
+++ vhTest/Fake/APPS/Blum/impl/OnlineProductConfiguratorService/Rapporteur.cls.xml (.../Rapporteur.cls.xml) (revision 41148)
@@ -8,7 +8,7 @@
APPS.Blum.impl.OnlineProductConfiguratorService.Rapporteur
-Meldingen:%ListOfDataTypes,UserName:%String,KlantID:%String
+Meldingen:%ListOfDataTypes,UserName:%String,Klant:DOM.VKP.VanHoeckeKlant