Á

Álvaro Moura

Last updated on Jul 6, 2026

In this tutorial we will learn how to create a bank slip application in Scriptcase, the bar code used will be 2 out of 5 in the Febraban Collection pattern.

(The file is available for download at the end).

FEBRABAN:http://www.febraban.org.br

  • HTML file with the billet layout.

  • Access the Scriptcase template option.

  1. Click on New Template;
  2. Select the type as Free Format;
  3. Upload the HTML file.

  • Set the orientation of the query to free format.

  • Select the free format template, in this case the billet.

  • Create the type 2 barcode field of 5.

  • Create a text field for a digitable line.

  • Now let's create the M_codigobarras method for configuring the barcode.

$ free - Variable that contains the 25 free positions of the bar code, in the example the free part does not have the 25 positions, but the macro is complete with 0 (Zeros).
$ valor_boleto - formatted to work to two decimal places (truncates the value).
$ data - formatted in yyyymmdd, as it must be used in that format.
After formatting the values, we will use the sc_lin_cod_barra_banco macro to generate the barcode.

Parameters:

{codigobarras} - Type 2 barcode field of 5.
'409' - Bank code (FEBRABAN).
'9' - Currency Code (FEBRABAN).
$ valor_boleto - Document value.
$ free - Free part (FEBRABAN).
$ data - Expiration Date.

  • In this step, we will associate the existing fields in the query with the variables defined in the free format (HTML file used).

  • Auxiliary application (Order inquiry), for generating the ticket according to the order.

  • Billet generated.

We held a live showing the creation of the billet on 06/19/2015. The video with the recording of the seminar can be seen on this youtube link: