;** Eb_0193  ********************************************************************
;*  Emissao de Boletas - Banco Itau  INBEC                                     *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 03/03/2008 por Nikolas
;Ultima Alteracao: 14/04/2008 por Nikolas
;Motivo Alteracao: Ajustes

;*******************************************************************************
;* Rotina de Impressao de Duplicatas                                           *
;*******************************************************************************

Print File ARQIMP "\n\n"

Print File ARQIMP Spaces(00)+"PAGAVEL EM QUALQUER AGENCIA ATE O VENCIMENTO"+Spaces(07)+Format("D13",[Data Vencimento])+"\n"

Print File ARQIMP "\n\n"

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

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

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

Print File ARQIMP "\n"

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

Print File ARQIMP "\n"

Print File ARQIMP Spaces(1)+SubStr(MSGDUP,1,45)+"\n"
Print File ARQIMP Spaces(1)+SubStr(MSGDUP,46,45)+"\n"
Print File ARQIMP Spaces(1)+SubStr(MSGDUP,91,45)+"\n"
Print File ARQIMP Spaces(1)+SubStr(MSGDUP,136,15)+"\n"

Print File ARQIMP "\n\n\n"

Print File ARQIMP Spaces(07)+[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(07)+[Answer->Endereco Fatura]+" -   " + [Answer->Bairro Fatura]+"\n"
        Print File ARQIMP Spaces(07)+[Answer->Cidade Fatura]+"/"+[Answer->UF Fatura]+" -   "+[Answer->CEP Fatura]+"\n"
   Else
        Print File ARQIMP Spaces(07)+[Answer->Endereco de Cobranca]+" -   " + [Answer->Bairro de Cobranca]+"\n"
        Print File ARQIMP Spaces(07)+[Answer->Cidade de Cobranca]+"/"+[Answer->UF de Cobranca]+" -   "+[Answer->CEP de Cobranca]+"\n"
EndIf

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

Print File ARQIMP CI_10CPP
Print File ARQIMP CI_6LPP

