Payment Slip Template Creation (Brazilian Hub SuiteApp)

To generate payment slips for a bank that is not predefined by the Brazilian Hub SuiteApp, you must create a payment slip template.

Create the payment slip template in HTML. Follow the bank’s guidelines when you create the template.

The following code is a sample payment slip template.

          <pdf>
   <head>
      <style>      BODY { font-size:6pt; }   </style>
   </head>
   <body>
      <#list installment.customInstallments as objInstallment>
         <#assign valor = objInstallment.amount?number?string.currency?replace("R","")?replace("$","")?replace(" ","")?replace("¤","")?replace("£","")?replace("€","")>   
         <div>
            <div>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-top="1" border-left="1" width="320">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Nome do Cliente</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt"><#if customer.isperson == "T">${‌customer.firstname} ${‌customer.lastname}<#else>${‌customer.companyname}</#if></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" border-top="1" width="110">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Data de Vencimento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${objInstallment.dueDate?date}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" border-top="1" width="110">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Valor Cobrado</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right">${valor}</td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                  <tr>
                     <td border-right="1" border-bottom="1" border-left="1" width="400">
                        <table>
                           <tr>
                              <td font-size="8pt"><b>Nome do Beneficiário/CNPJ/CFP/Endereço: </b></td>
                           </tr>
                           <tr>
                              <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.legalname']}<#else>${invoice.custbody_sit_invoce_t_raz_soc_sub?string}.</#if></td>
                              <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.custrecord_psg_br_cnpj']}<#else>${objInstallment.cnpjBeneficiary?string}</#if></td>
                           </tr>
                           <tr>
                              <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.custrecord_sit_address_l_tp_logr']} ${subsidiary['subsidiary.address1']}, ${subsidiary['subsidiary.custrecord_sit_address_i_numero']} - ${subsidiary['subsidiary.custrecord_o2g_address_l_mun']} - ${subsidiary['subsidiary.zip']}<#else>${invoice.custbody_o2s_address_tp_logr} ${invoice.custbody_o2g_logr_end_sub}, ${invoice.custbody_o2g_nr_end_sub} <#if invoice.custbody_o2s_address_compl_subsidiaria != "">- ${invoice.custbody_o2s_address_compl_subsidiaria} </#if>- ${invoice.custbody_o2g_bairro_end_sub} - ${invoice.custbody_o2g_nm_mun_end_sub} - ${invoice.custbody_o2g_uf_end_sub} - ${invoice.custbody_o2g_cep_end_sub}</#if></td>
                           </tr>
                        </table>
                     </td>
                  </tr>
               </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="160">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Agência / Código do Beneficiário</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" >${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_numero_agencia}-${ customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_dv_numero_agenc }/<#if objInstallment.beneficiaryCode?string?trim != "">${ objInstallment.beneficiaryCode?string }</#if></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="160">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Nosso Número / Cód. do Documento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${‌objInstallment.ourNumber}</td>
                       </tr>
                     </table>
                  </td>
                  <td margin="5" border-left="1" border-top="1" border-right="1" align="center">Autenticação Mecânica</td>
                </tr>
              </table>
              <div width="540" margin-top="15pt" border-top="1" border-style="dashed"></div>
              <table table-layout="fixed" width="540" margin-top="15pt" font-size="13pt" >
                <tr>
                  <td border-right="1" width="120"><#if custom.logoUrl != ""><img src = "${‌custom.logoUrl}" width = "60%" height="60%" ></img></#if></td>
                  <td border-right="1" width="40" align="center" vertical-align="bottom"><b>${‌custom.bankNumber}</b></td>
                  <td align="right" vertical-align="bottom"><b>${‌objInstallment.digitableNumber}</b></td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" border-top="1" width="400">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Local de Pagamento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" >Pagável preferencialmente na Rede Bradesco ou Bradesco Expresso.</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" border-top="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Vencimento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="center"><b>${objInstallment.dueDate?date}</b></td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="400">
                     <table>
                        <tr>
                           <td font-size="8pt"><b>Nome do Beneficiário/CNPJ/CFP/Endereço: </b></td>
                        </tr>
                        <tr>
                           <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.legalname']}<#else>${invoice.custbody_sit_invoce_t_raz_soc_sub?string}.</#if></td>
                           <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.custrecord_psg_br_cnpj']}<#else>${objInstallment.cnpjBeneficiary?string}</#if></td>
                        </tr>
                        <tr>
                           <td font-size="8pt"><#if custom.isParent?string == "true">${subsidiary['subsidiary.custrecord_sit_address_l_tp_logr']} ${subsidiary['subsidiary.address1']}, ${subsidiary['subsidiary.custrecord_sit_address_i_numero']} - ${subsidiary['subsidiary.custrecord_o2g_address_l_mun']} - ${subsidiary['subsidiary.zip']}<#else>${invoice.custbody_o2s_address_tp_logr} ${invoice.custbody_o2g_logr_end_sub}, ${invoice.custbody_o2g_nr_end_sub} <#if invoice.custbody_o2s_address_compl_subsidiaria != "">- ${invoice.custbody_o2s_address_compl_subsidiaria} </#if>- ${invoice.custbody_o2g_bairro_end_sub} - ${invoice.custbody_o2g_nm_mun_end_sub} - ${invoice.custbody_o2g_uf_end_sub} - ${invoice.custbody_o2g_cep_end_sub}</#if></td>
                        </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Agência / Código do Beneficiário</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="center">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_numero_agencia}-${ customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_dv_numero_agenc }/<#if objInstallment.beneficiaryCode?string?trim != "">${ objInstallment.beneficiaryCode?string }</#if></td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">   
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="100">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Data do Documeto</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${custom.createdDate?date}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="100">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Número do Documento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt"><#if invoice.custbody_sit_transaction_i_numero_nfe != ""><#if invoice.custbody_o2s_cod_pagto_t_indc_form_pag == "0" >${invoice.custbody_sit_transaction_i_numero_nfe} / A Vista<#else>${invoice.custbody_sit_transaction_i_numero_nfe} / ${objInstallment.installment.custrecord_sit_parcela_i_numero}</#if><#else><#if invoice.custbody_o2s_transac_t_nr_nfse != ""><#if invoice.custbody_o2s_cod_pagto_t_indc_form_pag == "0" >${invoice.custbody_o2s_transac_t_nr_nfse} / A Vista<#else>${invoice.custbody_o2s_transac_t_nr_nfse} / ${objInstallment.installment.custrecord_sit_parcela_i_numero}</#if><#else><#if invoice.custbody_o2s_cod_pagto_t_indc_form_pag == "0">${‌invoice.tranid} / A Vista<#else>${‌invoice.tranid} / ${objInstallment.installment.custrecord_sit_parcela_i_numero}</#if></#if></#if></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="60">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Espécie Doc.</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_especie_documento.custrecord_o2s_cnab_especie_doc_abrev}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="40">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Aceite</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_c_dad_ad_aceite[0]}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="100">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Data Processamento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" >${custom.createdDate?date}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Nosso-Número</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="center">${‌objInstallment.ourNumber}</td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="70">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Uso do Banco</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt"></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="30">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>CIP</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt"></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="70">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Carteira</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_carteira.custrecord_o2s_cnab_i_carteira_codigo}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="30">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Moeda</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_i_conf_moeda}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="100">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Quantidade</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt"></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1" width="100">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Valor</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" ></td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>Valor do Documento</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right"><b>${valor}</b></td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="400" rowspan="5">
                     <table>
                       <tr>
                         <td font-size="8pt"><b>Informações de responsabilidade do beneficiário</b></td>
                       </tr>
                                <#if objInstallment.expirationDays?string != "">
                                   <tr>
                                      <td font-size="8pt">Data de expiração do boleto: ${objInstallment.expirationDays?string}</td>
                                   </tr>
                                </#if>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_instruc_linha_1}</td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_instruc_linha_2}</td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_instruc_linha_3}</td>
                       </tr>
                       <tr>
                         <td font-size="8pt">${customrecord_o2s_cnab_bancos_contas.custrecord_o2s_cnab_bc_t_instruc_linha_4}</td>
                       </tr>
                     </table>
                  </td>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>(-)Desconto/Abatimentos</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right">${‌objInstallment.discountAmount}</td>
                       </tr>
                     </table>
                  </td>
                </tr>
                <tr>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>(+)Juros / Multa</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right">${‌objInstallment.fineAndInterestAmount}</td>
                       </tr>
                     </table>
                  </td>
                </tr>
                <tr>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>(+)Outros Acréscimos</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right"><b>0.00</b></td>
                       </tr>
                     </table>
                  </td>
                </tr>
                <tr>
                  <td border-right="1" border-bottom="1">
                     <table width="100%">
                       <tr>
                         <td font-size="8pt"><b>(=)Valor Cobrado</b></td>
                       </tr>
                       <tr>
                         <td font-size="8pt" align="right"><b>${valor}</b></td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td border-right="1" border-bottom="1" border-left="1" width="100%" height="50" rowspan="5">
                     <table>
                              <tr>
                                 <td font-size="8pt"><b>Nome do Pagador: </b></td>
                                 <td font-size="8pt"><#if customer.isperson == "T">${‌customer.firstname} ${‌customer.lastname}<#else>${‌customer.companyname}</#if></td>
                                 <td font-size="8pt"><b>CNPJ/CPF: </b></td>
                                 <td font-size="8pt"><#if customer.custentity_psg_br_cnpj != "">${customer.custentity_psg_br_cnpj}<#else>${customer.custentity_psg_br_cpf}</#if></td>
                              </tr>
                           </table>
                           <table>
                              <tr>
                                 <td font-size="8pt"><b>Endereço: </b></td>
                              <td font-size="8pt">${invoice.custbody_sit_customer_t_tplogradouro} ${invoice.custbody_sit_customer_t_endereco}, ${invoice.custbody_sit_customer_t_numero} <#if invoice.custbody_sit_customer_t_complemento != "">- ${invoice.custbody_sit_customer_t_complemento}</#if> - ${invoice.custbody_sit_customer_t_bairro} - ${customer.custentity_sit_codmun} - ${invoice.custbody_sit_customer_t_cep}</td>   
                     </tr>
                           </table>
                  </td>
                </tr>
              </table>
              <table table-layout="fixed" width="540">
                <tr>
                  <td align="left">
                     <barcode margin-top="15pt" codetype="code-25" showtext="false" value="${‌objInstallment.codeBar}" bar-width="0.8"/>
                  </td>
                  <td margin-top="5pt" >
                     <table width="100%">
                       <tr>
                         <td align="center">Autenticação Mecânica</td>
                         <td font-size="8pt" align="right">FICHA DE COMPENSAÇÂO</td>
                       </tr>
                     </table>
                  </td>
                </tr>
              </table>
            </div>
         </div>
      </#list>
   </body>
</pdf> 

        

After you create the HTML template, you must associate it with a bancos (banks) record. For more information, see Creating Bancos Records in Brazil (Brazilian Hub SuiteApp).

Related Topics

General Notices