Adicionado estrutura para não processar faturas da Copel do tipo "deposito judicial" e "ajuste do desconto"

This commit is contained in:
Adriano Serighelli 2025-06-10 09:59:43 -03:00
parent 444530e568
commit 9197d900ff

View File

@ -118,9 +118,11 @@ namespace Webhook_4docs
JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement; JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement;
if (root.Get("documentType").ToString().ToLower() != string.Empty) string tipoDocumento = root.Get("documentType").ToString().ToLower();
if (tipoDocumento != string.Empty && tipoDocumento != "nota_fiscal")
{ {
if (root.Get("documentType")?.ToString().ToLower() != "nota_fiscal") { return; } return;
} }
Fatura fatura = new(fatura_ID, JsonBody); Fatura fatura = new(fatura_ID, JsonBody);