Index: BL/PPS/TBX/DocsV1.cls.xml =================================================================== diff -u -r54263 -r54275 --- BL/PPS/TBX/DocsV1.cls.xml (.../DocsV1.cls.xml) (revision 54263) +++ BL/PPS/TBX/DocsV1.cls.xml (.../DocsV1.cls.xml) (revision 54275) @@ -75,6 +75,11 @@ 1 + +APPS.Halux.common.ProductieService +1 + + DOM.PM.ProductAPI 1 @@ -166,7 +171,7 @@ -LabelPrinter:BL.Sys.LabelPrinter="",BatchService:APPS.Halux.common.BatchService="",ProductieSequentieRepository:APPS.Halux.common.ProductieSequentieRepository="",ToeleveringService:DOM.AKP.ToeleveringService,LogoBepaler:BL.PPS.common.impl.OnderdelendoosLogoBepaler +LabelPrinter:BL.Sys.LabelPrinter="",BatchService:APPS.Halux.common.BatchService="",ProductieSequentieRepository:APPS.Halux.common.ProductieSequentieRepository="",ToeleveringService:DOM.AKP.ToeleveringService,LogoBepaler:BL.PPS.common.impl.OnderdelendoosLogoBepaler,ProductieService:APPS.Halux.common.ProductieService="" 1 1 %Status @@ -176,6 +181,7 @@ Set ..BatchService = $$$Implementation(BatchService, ##class(APPS.Halux.common.impl.BatchService).%New()) Set ..ProductieSequentieRepository = $$$Implementation(ProductieSequentieRepository, ##class(APPS.Halux.common.impl.ProductieSequentieRepository).%New()) Set ..ToeleveringService = $$$Inject(ToeleveringService,##class(DOM.AKP.impl.ToeleveringService).%New()) + Set ..ProductieService = $$$Inject(ProductieService, ##class(APPS.Halux.common.ProductieService).%New()) Set ..ProductAPI = ##class(DOM.DomeinContext).Instance().GeefProductAPI() Set ..TBXMatToEnuMatConverter = ##class(BL.PPS.TBX.impl.TBXMatToEnuMatConverter).%New() Set ..MatFormatter = ##class(APPS.Halux.PPS.impl.Formatter.Mat).%New() @@ -1789,7 +1795,8 @@ Set pxLabel=##class(BL.PPS.TBX.sub.pxCommissie).%New() - If (##class(DOM.common.impl.ProjectSettingsAPI).%New().IsActiefAnderePrinterVoorTaxBatchesBijHalux() && ..IsToeleveringMetProductTypeTax(TOENr)) { + If (##class(DOM.common.impl.ProjectSettingsAPI).%New().IsActiefAnderePrinterVoorTaxBatchesBijHalux() && + (..ProductieService.GeefCategorieVoorToelevering(Toelevering) = ##class(APPS.Halux.common.enu.Categorie).TAORbox())) { Set pxLabel.Device = ..#LabelPrinterTax } Else { Set pxLabel.Device = ..#LabelPrinter @@ -1920,29 +1927,6 @@ Quit IsPalletOfProcomVerpakking ]]> - - -ToeleveringID:%String -1 -%Boolean - 1) { - Set Omschrijving = "Het ProductType van Toelevering '"_ToeleveringID_"' kon niet bepaald worden om de juiste etiketprinter te definiƫren. Er zitten meerdere ProductTypes in de Toelevering." - Set Exception = ##class(TECH.Exceptions.GeneralErrorException).%New(Omschrijving) - Do ##class(TECH.ExceptionHandler).Throw(Exception) - } - - Quit (ProductTypeLijst.GetAt(1) = ##class(DOM.PM.enu.ProductType).TAORbox()) -]]> - Index: vhUnitTest/BL/PPS/TBX/DocsV1/EtikettenCommissieOne/Test.cls.xml =================================================================== diff -u -r54263 -r54275 --- vhUnitTest/BL/PPS/TBX/DocsV1/EtikettenCommissieOne/Test.cls.xml (.../Test.cls.xml) (revision 54263) +++ vhUnitTest/BL/PPS/TBX/DocsV1/EtikettenCommissieOne/Test.cls.xml (.../Test.cls.xml) (revision 54275) @@ -25,9 +25,12 @@ #dim ToeleveringService As vhTest.Mock.DOM.AKP.ToeleveringService = ##class(vhTest.Mock.DOM.AKP.ToeleveringService).%New() do ToeleveringService.IndienMethodCall("GeefKlant",$$$DummyInteger).DanReturn(Klant) - Do ToeleveringService.IndienMethodCall("GeefProductTypes", $$$DummyInteger).DanReturn(ProductTypes) - Set DocsV1 = ##class(BL.PPS.TBX.DocsV1).%New(,,,ToeleveringService,LogoBepalerMock) + #dim Categorie As APPS.Halux.common.enu.Categorie = ##class(APPS.Halux.common.enu.Categorie).Legrabox() + #dim ProductieService As APPS.Halux.common.ProductieService = ##class(vhTest.Mock.APPS.Halux.common.ProductieService).%New() + Do ProductieService.IndienMethodCall("GeefCategorieVoorToelevering", ToeleveringStub).DanReturn(Categorie) + + Set DocsV1 = ##class(BL.PPS.TBX.DocsV1).%New(,,,ToeleveringService,LogoBepalerMock,ProductieService) #dim Etiket As BL.PPS.TBX.sub.pxCommissie = DocsV1.EtikettenCommissieOne($$$DummyInteger,1,"") Do $$$AssertEquals(Etiket.Logo,"DummyLogo") @@ -55,9 +58,12 @@ #dim ToeleveringService As vhTest.Mock.DOM.AKP.ToeleveringService = ##class(vhTest.Mock.DOM.AKP.ToeleveringService).%New() do ToeleveringService.IndienMethodCall("GeefKlant",$$$DummyInteger).DanReturn(Klant) - Do ToeleveringService.IndienMethodCall("GeefProductTypes", $$$DummyInteger).DanReturn(ProductTypes) - Set DocsV1 = ##class(BL.PPS.TBX.DocsV1).%New(,,,ToeleveringService,LogoBepalerMock) + #dim Categorie As APPS.Halux.common.enu.Categorie = ##class(APPS.Halux.common.enu.Categorie).TAORbox() + #dim ProductieService As APPS.Halux.common.ProductieService = ##class(vhTest.Mock.APPS.Halux.common.ProductieService).%New() + Do ProductieService.IndienMethodCall("GeefCategorieVoorToelevering", ToeleveringStub).DanReturn(Categorie) + + Set DocsV1 = ##class(BL.PPS.TBX.DocsV1).%New(,,,ToeleveringService,LogoBepalerMock,ProductieService) #dim Etiket As BL.PPS.TBX.sub.pxCommissie = DocsV1.EtikettenCommissieOne($$$DummyInteger,1,"") Do $$$AssertEquals(Etiket.Logo,"DummyLogo")