(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.
- Click on New Template;
- Select the type as Free Format;
- 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: