Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementado TratarRetornoConsultarNFSe no IPM2 #234

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}