;** Eb_0022 **********************************************************************
;*  Emissao de Boletas - BancooB   Div. Botoes                                 *
;********************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 22/08/2002 por Karen Lauar e Rodrigo F.
;Ultima Alteracao: 13/01/2006 por Davi Carrano
;Motivo Alteracao: Inclusao do numero da nota

;*******************************************************************************
;* Rotina de Impressao de Duplicatas                                           *
;*******************************************************************************
Print File ARQIMP CI_10CPP
Print File ARQIMP CI_8LPP

Print File ARQIMP "\n\n"
Print File ARQIMP Spaces(48)+Format("D10",[Data Vencimento])+"\n"
Print File ARQIMP "\n\n\n"

Print File ARQIMP Spaces(00)+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(03)+"DM"+"\n"
Print File ARQIMP "\n"

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

Print File ARQIMP "\n"

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

Print File ARQIMP Spaces(03)+"Nf n§ "+NoNota[NBOL]+"\n"
NBOL=NBOL+1
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\n\n\n"

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

Print File ARQIMP CI_10CPP
Print File ARQIMP CI_6LPP

