From 14f54d5a2318f1dd744dadacdec22ab4094e8c78 Mon Sep 17 00:00:00 2001 From: Claudinei Cecilio Date: Fri, 6 Sep 2024 15:26:01 -0300 Subject: [PATCH] =?UTF-8?q?fix:Ajuste=20nos=20endere=C3=A7os=20dos=20webse?= =?UTF-8?q?rvice=20para=20o=20evento=20de=20insucesso=20na=20entrega=20(NT?= =?UTF-8?q?=202023.005);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DFe.Classes/Entidades/Estado.cs | 6 ++++++ NFe.Servicos/ServicoNfeFactory.cs | 2 +- NFe.Servicos/ServicosNFe.cs | 4 ++-- NFe.Utils/Enderecos/Enderecador.cs | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/DFe.Classes/Entidades/Estado.cs b/DFe.Classes/Entidades/Estado.cs index 4461718d..27c38adb 100644 --- a/DFe.Classes/Entidades/Estado.cs +++ b/DFe.Classes/Entidades/Estado.cs @@ -204,6 +204,12 @@ public enum Estado [XmlEnum("91")] AN = 91, + /// + /// SVRS + /// + [XmlEnum("92")] + SVRS = 92, + /// /// Exterior /// diff --git a/NFe.Servicos/ServicoNfeFactory.cs b/NFe.Servicos/ServicoNfeFactory.cs index b9e7eb1c..7ba3225f 100644 --- a/NFe.Servicos/ServicoNfeFactory.cs +++ b/NFe.Servicos/ServicoNfeFactory.cs @@ -231,7 +231,7 @@ public static INfeServico CriaWsdlOutros(ServicoNFe servico, ConfiguracaoServico case ServicoNFe.RecepcaoEventoInsucessoEntregaNFe: case ServicoNFe.RecepcaoEventoCancInsucessoEntregaNFe: - return new RecepcaoEvento4AN(url, certificado, cfg.TimeOut); + return new RecepcaoEvento4SVCAN(url, certificado, cfg.TimeOut); case ServicoNFe.RecepcaoEventoManifestacaoDestinatario: if (cfg.VersaoRecepcaoEventoManifestacaoDestinatario == VersaoServico.Versao400) diff --git a/NFe.Servicos/ServicosNFe.cs b/NFe.Servicos/ServicosNFe.cs index 4aee927e..70a875e3 100644 --- a/NFe.Servicos/ServicosNFe.cs +++ b/NFe.Servicos/ServicosNFe.cs @@ -824,7 +824,7 @@ public RetornoRecepcaoEvento RecepcaoEventoInsucessoEntrega(int idlote, }; var infEvento = new infEventoEnv { - cOrgao = _cFgServico.cUF, + cOrgao = Estado.SVRS, tpAmb = _cFgServico.tpAmb, chNFe = chaveNFe, dhEvento = dhEvento ?? DateTime.Now, @@ -876,7 +876,7 @@ public RetornoRecepcaoEvento RecepcaoEventoCancInsucessoEntrega(int idlote, var infEvento = new infEventoEnv { - cOrgao = _cFgServico.cUF, + cOrgao = Estado.SVRS, tpAmb = _cFgServico.tpAmb, chNFe = chaveNFe, dhEvento = dhEvento ?? DateTime.Now, diff --git a/NFe.Utils/Enderecos/Enderecador.cs b/NFe.Utils/Enderecos/Enderecador.cs index 36de39cd..0a9acc29 100644 --- a/NFe.Utils/Enderecos/Enderecador.cs +++ b/NFe.Utils/Enderecos/Enderecador.cs @@ -1644,8 +1644,8 @@ private static List CarregarEnderecosServicos() addServico(new[] { ServicoNFe.ConsultaGtin }, versao1, TipoAmbiente.Homologacao, emissao, estado, modelo, "https://dfe-servico.svrs.rs.gov.br/ws/ccgConsGTIN/ccgConsGTIN.asmx"); //Insucesso Entrega NFe - addServico(new[] { ServicoNFe.RecepcaoEventoInsucessoEntregaNFe, ServicoNFe.RecepcaoEventoCancInsucessoEntregaNFe }, versao1, TipoAmbiente.Producao, emissao, estado, modelo, "https://www.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"); - addServico(new[] { ServicoNFe.RecepcaoEventoInsucessoEntregaNFe, ServicoNFe.RecepcaoEventoCancInsucessoEntregaNFe }, versao1, TipoAmbiente.Homologacao, emissao, estado, modelo, "https://hom1.nfe.fazenda.gov.br/NFeRecepcaoEvento4/NFeRecepcaoEvento4.asmx"); + addServico(new[] { ServicoNFe.RecepcaoEventoInsucessoEntregaNFe, ServicoNFe.RecepcaoEventoCancInsucessoEntregaNFe }, versao1, TipoAmbiente.Producao, emissao, estado, modelo, "https://nfe.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"); + addServico(new[] { ServicoNFe.RecepcaoEventoInsucessoEntregaNFe, ServicoNFe.RecepcaoEventoCancInsucessoEntregaNFe }, versao1, TipoAmbiente.Homologacao, emissao, estado, modelo, "https://nfe-homologacao.svrs.rs.gov.br/ws/recepcaoevento/recepcaoevento4.asmx"); } } }