;** EbCef **********************************************************************
;*  Emissao de Boletas - Caixa Economica Federal                               *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 28/10/1997 por Anivel Augusto Rodrigues
;Ultima Alteracao: 10/07/2003 por Karen Lauar Nery
;Motivo Alteracao: Mudanca ARQIMP

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

Print File ARQIMP CI_8LPP

Print File ARQIMP "\n\n"

Print File ARQIMP Spaces(02)+"QUALQUER AGENCIA ATE O VENCIMENTO"
If [NotaC->Descricao CondPagto]="CONTRA APRESENTACAO"
   Then Print File ARQIMP Spaces(22)+"C.APRESENT \n"
   Else Print File ARQIMP Spaces(22)+AlinhM(LTrim(StrVal(Format("D13",[Data Vencimento]))),10)+"\n"
EndIf

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

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

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

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

Print File ARQIMP "\n"

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

Print File ARQIMP "\n\n"

Print File ARQIMP Spaces(2)+SubStr(MSGDUP,001,44)+"\n"
Print File ARQIMP Spaces(2)+SubStr(MSGDUP,045,44)+"\n"
Print File ARQIMP Spaces(2)+SubStr(MSGDUP,089,44)+"\n"
Print File ARQIMP Spaces(2)+SubStr(MSGDUP,133,44)+"\n"

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

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

