I'm working with the boleto.net library, I'm generating boletins from the brazilian bank and the following problem is occurring.
I am generating the right ticket but the ticket bar code is coming with the end, where would be the wrong ticket area + VALUE TICKET area.
Below code returned from property BoletoBancario.Boleto.CodigoBarra.Codigo 00196.88472 32677.473001 00000.085183 1 550000000002
Below code returned from the BoletoBancario.Boleto.CodigoBarra.LinhaDigitavelFormatada property 00190.00009 02688.473269 77473.0000000085187 1 67830000055000
If you analyze the above codes, if we take the final stretch ( 550000000002 ) of the first and insert the end of the second code ( 67830000055000 ), the ticket is generated correctly. / p>
string convenio = "2677473";
var contaBancaria = new ContaBancaria()
{
Agencia = "4175",
DigitoAgencia = "2",
Conta = "6141",
DigitoConta = "5",
OperacaConta = "019"
};
var cedente = new Cedente()
{
Codigo = convenio, //ced.ID.ToString().PadLeft(7, '0'),
//Convenio = Convert.ToInt32(convenio),
CPFCNPJ = ced.CPF_CNPJ,
Nome = ced.RAZAO_SOCIAL.ToUpper(),
ContaBancaria = contaBancaria
};
var sacado = new Sacado()
{
CPFCNPJ = "",
Nome = "",
Endereco = new Endereco()
{
End = "",
Bairro = "",
Cidade = "",
UF = "",
CEP = ""
}
};
var boleto = new Boleto()
{
ContaBancaria = contaBancaria,
DataVencimento = "2016-05-03",
ValorBoleto = "550.00",
NossoNumero = "26774730000000085",
NumeroDocumento = "0000000085",
Carteira = "18",
Cedente = cedente,
Sacado = sacado,
EspecieDocumento = new EspecieDocumento_BancoBrasil("4"),
LocalPagamento = "QUALQUER BANCO",
Instrucoes = new List<IInstrucao>() { new Instrucao_BancoBrasil() { Descricao = "" } },
};
var boleto_bancario = new BoletoBancario()
{
CodigoBanco = 001,
Boleto = boleto,
MostrarCodigoCarteira = false,
MostrarComprovanteEntrega = false
};
boleto_bancario.Boleto.Valida();
boleto_bancario.MontaHtmlEmbedded();
Is this the data that is filled in, something wrong or missing?