Skip to content

Commit

Permalink
Merge pull request #39 from neicecilio/feature/insucessoEntrega
Browse files Browse the repository at this point in the history
fix:Ajuste nos endereços dos webservice para o evento de insucesso na entrega (NT 2023.005)
  • Loading branch information
danilobreda authored Sep 7, 2024
2 parents b6a7d80 + 14f54d5 commit 6a07023
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions DFe.Classes/Entidades/Estado.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ public enum Estado
[XmlEnum("91")]
AN = 91,

/// <summary>
/// SVRS
/// </summary>
[XmlEnum("92")]
SVRS = 92,

/// <summary>
/// Exterior
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion NFe.Servicos/ServicoNfeFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions NFe.Servicos/ServicosNFe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions NFe.Utils/Enderecos/Enderecador.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,8 @@ private static List<EnderecoServico> 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");
}
}
}
Expand Down

0 comments on commit 6a07023

Please sign in to comment.