Skip to content

Commit

Permalink
Implementado TratarRetornoConsultarNFSe no IPM2
Browse files Browse the repository at this point in the history
  • Loading branch information
Transis-Felipe authored Apr 11, 2023
1 parent 4bdc6da commit 1655d8d
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/OpenAC.Net.NFSe/Providers/IPM2/ProviderIPM2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,24 @@ protected override void AssinarConsultarLoteRps(RetornoConsultarLoteRps retornoW
}
protected override void AssinarConsultarNFSe(RetornoConsultarNFSe retornoWebservice) { }

protected override void TratarRetornoConsultarNFSe(RetornoConsultarNFSe retornoWebservice, NotaServicoCollection notas)
{
try
{
var xmlDoc = new XmlDocument();
//verifica se a mensagem eh xml para exibicao correta do erro
xmlDoc.LoadXml(retornoWebservice.XmlRetorno);
}
catch
{
retornoWebservice.Erros.Add(new Evento { Codigo = "0", Descricao = retornoWebservice.XmlRetorno });
//LIMPA O XML RETORNO PARA NAO DAR ERRO DE PARSE MAIS ADIANTE
retornoWebservice.XmlRetorno = null;
}

return;
}

#region Não implementados

public override string WriteXmlNFSe(NotaServico nota, bool identado = true, bool showDeclaration = true) => throw new NotImplementedException();
Expand Down Expand Up @@ -645,13 +663,11 @@ protected override void AssinarConsultarNFSe(RetornoConsultarNFSe retornoWebserv

protected override void TratarRetornoConsultarSequencialRps(RetornoConsultarSequencialRps retornoWebservice) => throw new NotImplementedException();

protected override void TratarRetornoConsultarNFSe(RetornoConsultarNFSe retornoWebservice, NotaServicoCollection notas) => throw new NotImplementedException();

protected override void TratarRetornoCancelarNFSeLote(RetornoCancelarNFSeLote retornoWebservice, NotaServicoCollection notas) => throw new NotImplementedException();

protected override void TratarRetornoSubstituirNFSe(RetornoSubstituirNFSe retornoWebservice, NotaServicoCollection notas) => throw new NotImplementedException();

protected override string GetSchema(TipoUrl tipo) => throw new NotImplementedException();

#endregion Não implementados
}
}

0 comments on commit 1655d8d

Please sign in to comment.