;** EbBcoob **********************************************************************
;*  Emissao de Boletas - BancooB                                              *
;********************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 22/08/2002  por Karen Lauar e Rodrigo F.
;Ultima Alteracao: 23/08/2006  por Anivel Augusto Rodrigues
;Motivo Alteracao: Ajustes

;*******************************************************************************
;* Rotina de Impressao de Duplicatas                                           *
;*******************************************************************************
Print File ARQIMP CI_10CPP+CI_8LPP+"\n\n\n"
Print File ARQIMP Spaces(55)+Format("D10",[Data Vencimento])+"\n"
Print File ARQIMP "\n\n\n"

Print File ARQIMP Spaces(03)+Format("W08,AL",Format("D10",[Answer->Data de Emissao]))

If [Ordem do Documento]<>""
   Then Print File ARQIMP Spaces(04)+Format("W08,AL",[Answer->Numero do Documento]+"/"+[Ordem do Documento])
   Else Print File ARQIMP Spaces(04)+Format("W08,AL",[Answer->Numero do Documento]+"  ")
EndIf

Print File ARQIMP Spaces(06)+"DM"+"\n"

Print File ARQIMP "\n"

Print File ARQIMP Spaces(51)+Format("W12.2,EIC,AR",[Valor Duplicata])+"\n"

Print File ARQIMP "\n\n\n\n\n\n"

Print File ARQIMP Spaces(03)+SubStr(MSGDUP,001,41)+"\n"
Print File ARQIMP Spaces(03)+SubStr(MSGDUP,042,41)+"\n"
Print File ARQIMP Spaces(03)+SubStr(MSGDUP,083,41)+"\n"
Print File ARQIMP Spaces(03)+SubStr(MSGDUP,124,41)+"\n"

Print File ARQIMP "\n"

Print File ARQIMP Spaces(02)+[Answer->Codigo]+"  "+[Answer->Razao Social Fatura]+"    - CGC "+[Answer->CGC Fatura]+"\n"

If IsBlank([Answer->Endereco de Cobranca]) Or [Answer->Endereco de Cobranca]="O MESMO"
   Then Print File ARQIMP Spaces(08)+[Answer->Endereco Fatura]+" -   " + [Answer->Bairro Fatura]+"\n"
        Print File ARQIMP Spaces(08)+[Answer->Cidade Fatura]+"/"+[Answer->UF Fatura]+" -   "+[Answer->CEP Fatura]+"\n"
   Else
        Print File ARQIMP Spaces(08)+[Answer->Endereco de Cobranca]+" -   " + [Answer->Bairro de Cobranca]+"\n"
        Print File ARQIMP Spaces(08)+[Answer->Cidade de Cobranca]+"/"+[Answer->UF de Cobranca]+" -   "+[Answer->CEP de Cobranca]+"\n"
EndIf

Print File ARQIMP "\n\n\n\n\n\n\n\n"
Print File ARQIMP CI_10CPP+CI_6LPP

