Index: vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml =================================================================== diff -u -r64761 -r67595 --- vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml (.../Test.cls.xml) (revision 64761) +++ vhUnitTest/BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator/GenereerProboxInhoudEtiket/Test.cls.xml (.../Test.cls.xml) (revision 67595) @@ -192,6 +192,48 @@ ]]> + +" + Do HtmlInhoudProboxEtiketBepalerStub.IndienMethodCall("BepaalHtmlInhoudProboxEtiket", DnaCodeIterator).DanReturn(InhoudAlsHTML) + + Set OrderAPIStub = ##class(vhTest.Mock.DOM.VKP.OrderAPI).%New() + #dim Order As DOM.VKP.Order = ##class(vhTest.Utils.DOM.VKP.Order).StandaardOrderHoofding() + Do Order.IndienMethodCall("GeefVerzendingWijze").DanReturn($$$DummyString) + Do OrderAPIStub.IndienMethodCall("GeefOrder", ..DnaCode1.OrderId).DanReturn(Order) + + #dim Toelevering As DOM.AKP.Toelevering = ##class(vhTest.Utils.DOM.AKP.Toelevering).StandaardToeleveringHoofding() + #dim CurrentHorolog As TECH.String = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentHorolog() + Set ToeleveringAPIStub = ##class(vhTest.Mock.DOM.AKP.ToeleveringAPI).%New() + Do Toelevering.IndienMethodCall("GeefDueOutTime").DanReturn(CurrentHorolog) + Do ToeleveringAPIStub.IndienMethodCall("BestaatToelevering", $$$DummyString).DanReturn($$$True) + Do ToeleveringAPIStub.IndienMethodCall("GeefToelevering", ..DnaCode1.Toelevering).DanReturn(Toelevering) + + Set VerkoopAPIStub = ##class(vhTest.Mock.DOM.VKP.VerkoopAPI).%New() + #dim Klant As TECH.RegisteredObject = $$$DummyObject + Do VerkoopAPIStub.IndienMethodCall("GeefKlant", ..DnaCode1.KlantNummer).DanReturn(Klant) + + Set LogoBepalerStub = ##class(vhTest.Mock.BL.PPS.common.impl.OnderdelendoosLogoBepaler).%New() + #dim Logo As %String = "logo\"_$$$DummyString + Do LogoBepalerStub.IndienMethodCall("GeefLogo", Klant).DanReturn(Logo) + + Set ProboxInhoudEtiketGenerator = ##class(BL.PPS.TBX.DocsV1.ProboxInhoudEtiketGenerator).%New(PartijAPIStub, HtmlInhoudProboxEtiketBepalerStub, OrderAPIStub, ToeleveringAPIStub, VerkoopAPIStub, LogoBepalerStub) + #dim Device As %String = $$$DummyString + #dim Etiket As BL.Etiket.ProboxInhoud = ProboxInhoudEtiketGenerator.GenereerProboxInhoudEtiket(DnaCodeIterator, Device) + + Do $$$AssertEquals(Etiket.KlantNaam, "TRST") +]]> + + Etiket:BL.Etiket.ProboxInhoud,Device:%String,Partij:DOM.PARTIJ.Partij,InhoudAlsHTML:%String,Order:DOM.VKP.Order,ProductieWeek:%String,Logo:%String 1 Index: BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml =================================================================== diff -u -r64761 -r67595 --- BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml (.../ProboxInhoudEtiketGenerator.cls.xml) (revision 64761) +++ BL/PPS/TBX/DocsV1/ProboxInhoudEtiketGenerator.cls.xml (.../ProboxInhoudEtiketGenerator.cls.xml) (revision 67595) @@ -83,6 +83,9 @@ Set ProboxInhoudLabel.Aantal = 1 Set ProboxInhoudLabel.KlantNaam = Partij.GeefNaam() + If KlantId = ##class(DOM.VKP.enu.Klant).Tristar(){ + Set ProboxInhoudLabel.KlantNaam = "TRST" + } Set ProboxInhoudLabel.InhoudAlsHTML = ..HtmlInhoudProboxEtiketBepaler.BepaalHtmlInhoudProboxEtiket(DnaCodeIterator) Set ProboxInhoudLabel.PalletBarcode = PalletId Set ProboxInhoudLabel.PalletBarcodeTxt = ..FormatteerPalletID(PalletId)