Generation of Billets with Bopepo

Asked

Viewed 535 times

1

I have a system that generates an accounts receivable, and I am trying to implement the generation of bank slips, my teacher Advisor indicated me the tool 'Bopepo' Jrmum. I entered in my system and managed to generate an example billet, but I want to pass the information to the billet per parameter as the user type.. Has anyone ever used this tool or know how to do it ? I await your response, Thank you.

 final Titulo crieOsDadosDoNovoTitulo(Titulo titulo) {

    /*
     * DADOS BÁSICOS.
     */
    titulo.setNumeroDoDocumento("12345");
    titulo.setNossoNumero("00234569812345");
    titulo.setDigitoDoNossoNumero("5");
    titulo.setValor(BigDecimal.valueOf(0.23));

    // Para informar a data de maneira simples você pode utilizar as 
    // classes utilitárias do JRimum. Abaixo temos alguns exemplos:
    // (1) titulo.setDataDoVencimento(  DateFormat.DDMMYYYY_B.parse("11/03/2011")  );
    // (2) titulo.setDataDoVencimento(  Dates.parse("11/03/2011", "dd/MM/yyyy")  );     
    titulo.setDataDoDocumento(new Date());
    titulo.setDataDoVencimento(new Date());

    titulo.setTipoDeDocumento(TipoDeTitulo.DM_DUPLICATA_MERCANTIL);
    titulo.setAceite(Aceite.A);
    titulo.setDesconto(new BigDecimal(0.05));
    titulo.setDeducao(BigDecimal.ZERO);
    titulo.setMora(BigDecimal.ZERO);
    titulo.setAcrecimo(BigDecimal.ZERO);
    titulo.setValorCobrado(BigDecimal.ZERO);

    return titulo;
}
  • You can post your code there to give a safer and firmer starting point to those who will answer your question?

  • I put an excerpt in the description, the values part. this class is Bopepo’s sample class, and I have my receivables class. I need to replace these values

  • Since you are using JSF (judging by the tag), I would just save this information inside a bean Managed and place a "generate billet" button. By clicking this button, he would do the validation, and if everything is right, he would execute this method by taking the information stored in the Managed bean to generate the boleto.

1 answer

0


Good night, Leandro.

I created a transport class (in which I collect the data I need to send in the BD) and from it and some more information I send the billet.

The issue of the tickets in Bopepo has some tricks that you discover in the tests (since the documentation is not enough). For example: 1) CPF or Sacado CNPJ has to be valid (often I don’t have that information). 2) The instructions have to be filled in even if with empty string (""). 3) DV of the current account and the billet has to be provided separately). Etc..

Tomorrow morning, I’ll clear the code and publish for you to take a look.

It was not difficult to come out of scratch and issue a ticket, although with fake data.

  • OK I’m waiting for the code because I have to have an example if not I can not and just this is practically missing to finalize my TCC rs I’m having a lot of difficulty in this part.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.