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

Novo fator de vencimento #350

Open
MarcosSoares opened this issue Feb 4, 2025 · 1 comment
Open

Novo fator de vencimento #350

MarcosSoares opened this issue Feb 4, 2025 · 1 comment

Comments

@MarcosSoares
Copy link

A FEBRABAN criou um novo fator de vencimento para boletos com vencimento a partir de 22/02/2025.

Atualizei a última versão, mas não atendia a esse novo critério.

Resolvi da seguinte forma:

/* Novo Fator de Vencimento */
DateTime dataReinicio = new DateTime(2025, 2, 22);
if (boleto.DataVencimento >= dataReinicio)
{
boleto.CodigoBarra.FatorVencimento = (1000 + (boleto.DataVencimento - dataReinicio).Days);
}
//////////////////////////////

boleto.ValidarDados();

Enfim, pra quem estiver passando por problemas, essa solução resolve.

@bbrez
Copy link

bbrez commented Feb 4, 2025

O novo fator de vencimento já é tratado no código de geração de fator de vencimento, como descrito no comentário acima do método de extensão BoletoNetCore.Extensions.DateTimeExtensions.FatorVencimento

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

No branches or pull requests

2 participants