Skip to content

Conversation

@marcosgerene
Copy link
Contributor

@marcosgerene marcosgerene commented Jan 5, 2026

[+] Adiciona o provedor SimplISS
[-] Atualiza o pacote System.Formats.Asn1 com vulnerabilidades
[+] Adiciona arquivo de configuração de cidades e console para edição simples do arquivo original
[-] Aplica micro correções para serializar o arquivo de configuração

@rftd o SimplISS está problemático a alguns dias, não consegui realizar todos os testes. Mas e emissão em homologação está funcional.

@marcosgerene marcosgerene changed the title add: SimplISS wip: SimplISS Jan 5, 2026
GravarArquivoEmDisco(strResponse, $"Enviar-{dps.Informacoes.NumeroDps:000000}-resp.json", documento);

// Reserializar com case insensitive para normalizar o JSON
object? obj = JsonSerializer.Deserialize<object>(strResponse, JsonOptions);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isso não está correto, sem falar que é redundante converter e converter de novo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O Json retornado quebra acentuação, a função disso é basicamente corrigir com System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não seria melhor então coloca a opção de passar o json options la no result, em vez de fazer 2 conversões

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tinha optado por não alterar NFSeResponse.
Feito.

</PackageReference>
<PackageReference Include="OpenAC.Net.Core" Version="1.6.0" />
<PackageReference Include="OpenAC.Net.DFe.Core" Version="1.6.0.2" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.2" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pq adicionou essa dependencia ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vou remover hoje a noite ao voltar para casa

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feito

public NFSeProvider Provedor { get; set; }

[DFeCollection("Ambiente")]
[DFeItem(typeof(NFSeEnvironment), "ambiente")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não inicie o nome com letra minuscula.

Copy link
Contributor Author

@marcosgerene marcosgerene Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não era pra ter ido, foi no meio das tentativas de corrigir o serializer.

Ajusto hoje a noite ao voltar para casa

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feito

{
var serviceInfo = Services[config.WebServices.CodigoMunicipio];
var serviceInfo = Services[config.WebServices.CodigoMunicipio] ??
Services[-1]; //marcosgerene: na minha concepção, se não encontrou o município, deve-se entender que é o Nacional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na minha concepção não, pois não sabes se o município está ativo no nacional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rftd

Este projeto nasceu como nacional, diferente do outro que nasceu para atender X provedores.

Acredito que isso ajuda inclusive com quebras de quem já utiliza o projeto.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mas assim não vai retornar os endereços do nacional, pois não existe a cidade nacional

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No arquivo que enviei de configurações coloco nacional como cidade -1. No Fallback do meu código "coalesce" coloco o município -1 como a busca.

<Services>
    <serviceInfo Id="-1">
      <Tipo>Nacional</Tipo>
      <Nome>NFSe Nacional</Nome>
      <UF>EX</UF>
      <Ambiente>
      ...

@marcosgerene marcosgerene changed the title wip: SimplISS add: provedor SimplISS Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants