Index: vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator/GenereerData/Test.cls.xml =================================================================== diff -u -r71755 -r71764 --- vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator/GenereerData/Test.cls.xml (.../Test.cls.xml) (revision 71755) +++ vhUnitTest/APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator/GenereerData/Test.cls.xml (.../Test.cls.xml) (revision 71764) @@ -12,6 +12,7 @@ #dim SequentieNummerToelevering As %Integer = 1 #dim VerzendingWijze As %String = "OD3;1`OD3;3" #dim VerwachteVerzendingWijzeGeformateerd = "OD3" + #dim KlantId As %String = "1000" #dim BatchMock As vhTest.Mock.APPS.Halux.common.Batch = ##class(vhTest.Mock.APPS.Halux.common.Batch).%New() Do BatchMock.VerwachtMethodCall("GeefID").ExactAantalKeer(2).DanReturn(BatchId) @@ -47,7 +48,7 @@ #dim Partij As DOM.PARTIJ.Partij = ##class(vhTest.Utils.DOM.PARTIJ.Partij).StandaardPartij() Do PartijAPIMock.VerwachtMethodCall("GeefPartij", "K||1234").DanReturn(Partij) Set LegacyPartijApiMock = ##class(vhTest.Mock.DOM.PARTIJ.LegacyPartijAPI).%New() - Do LegacyPartijApiMock.VerwachtMethodCall("GeefKlantNummerVoorPartijID", "K||1234").ExactAantalKeer(1).DanDoeNiks() + Do LegacyPartijApiMock.VerwachtMethodCall("GeefKlantNummerVoorPartijID", "K||1234").ExactAantalKeer(1).DanReturn(KlantId) Set DataVoorToeleveringGenerator = ##class(APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.DataVoorToeleveringGenerator).%New(BatchPitchExportedRepositoryMock, OrderApiMock, PartijAPIMock, LegacyPartijApiMock) #dim BatchNaarObjectiveData As APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.dto.BatchNaarObjectiveData = DataVoorToeleveringGenerator.GenereerData(BatchMock, ToeleveringMock, SequentieNummerToelevering) @@ -57,6 +58,7 @@ Do $$$AssertEquals(BatchNaarObjectiveData.Verzendwijze, VerwachteVerzendingWijzeGeformateerd) Do $$$AssertEquals(BatchNaarObjectiveData.Rangorde, BatchPitchExportedVolgnummer _ "_0000" _ SequentieNummerToelevering) Do $$$AssertEquals(BatchNaarObjectiveData.MultipersonalityKlant1, "null") + Do $$$AssertEquals(BatchNaarObjectiveData.KlantId, "01000") Do BatchMock.Verifieer() Do ToeleveringMock.Verifieer() Index: APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator.cls.xml =================================================================== diff -u -r71755 -r71764 --- APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator.cls.xml (.../DataVoorToeleveringGenerator.cls.xml) (revision 71755) +++ APPS/Halux/PPS/Document/impl/common/BatchNaarObjective/DataVoorToeleveringGenerator.cls.xml (.../DataVoorToeleveringGenerator.cls.xml) (revision 71764) @@ -72,7 +72,7 @@ #dim Partij As DOM.PARTIJ.Partij = ..PartijApi.GeefPartij(Toelevering.GeefKlantID()) Set BatchNaarObjectiveData.KlantNaam = ..GeefWaardeOfNull(Partij.GeefNaam()) - Set BatchNaarObjectiveData.KlantId = ..GeefWaardeOfNull(..LegacyPartijApi.GeefKlantNummerVoorPartijID(Toelevering.GeefKlantID())) + Set BatchNaarObjectiveData.KlantId = ..GeefWaardeOfNull(..PrependNul(..LegacyPartijApi.GeefKlantNummerVoorPartijID(Toelevering.GeefKlantID()))) Set BatchNaarObjectiveData.MultipersonalityKlant1 = ..GeefWaardeOfNull("") Set BatchNaarObjectiveData.MultipersonalityKlant2 = ..GeefWaardeOfNull("") @@ -107,7 +107,7 @@ #dim BatchPitchExported As APPS.Halux.Planning.Pitching.dto.BatchPitchExported = BatchPitchExportedLijst.GetAt(1) #dim Volgnummer As %String = BatchPitchExported.Volgnummer - Set Rangorde = Volgnummer _ "_" _ ..FormateerSequentieNummer(SequentieNummerToelevering) + Set Rangorde = Volgnummer _ "_" _ ..PrependNul(SequentieNummerToelevering) } ElseIf (BatchPitchExportedLijst.Size > 1) { Set Exception = ##class(TECH.Exceptions.DataCorruptException).%New("De rangorde kan niet worden bepaald voor BatchId '" _ BatchId _ "', aangezien er meerdere batches zijn gepitcht.") Do ..Logger.Error("BepaalRangorde", Exception.GeefOmschrijving()) @@ -124,7 +124,7 @@ ]]> - + Getal:%String,Lengte:%Integer=5 1 %String