You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered: