Skip to content

Novo fator de vencimento #350

Description

@MarcosSoares

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions