 ;** Ed_0058 ********************************************************************
;*  Emissao de Duplicatas                  DOMAR COUROS                        *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 17/06/2004 por Davi Pereira Carrano
;Ultima Alteracao:   /  /     por
;Motivo Alteracao: Ajustes

;*******************************************************************************
;* Rotina de Impressao de Duplicatas                                           *
;*******************************************************************************
Print File ARQIMP  CI_10CPP+CI_6LPP
Print File ARQIMP "\n\n\n\n\n\n"
Print File ARQIMP Spaces(53)+Format("D13",[Answer->Data de Emissao])
Print File ARQIMP "\n\n\n\n\n"
Print File ARQIMP Spaces(04)+Format("W6,AR",[Answer->Numero do Documento])
Print File ARQIMP Spaces(02)+Format("W8.2,AR",[Answer->Valor Nota Fiscal])
Print File ARQIMP Spaces(05)+Format("W8.2,AR",[Answer->Valor Nota Fiscal])
Print File ARQIMP Spaces(04)+Format("W6,AR",[Answer->Numero do Documento])
Print File ARQIMP Spaces(04)+Format("W11.2,AR",[Valor Duplicata])
Print File ARQIMP Spaces(02)+Format("W6,AR",[Answer->Numero do Documento])
If [Ordem do Documento]<>""
   Then Print File ARQIMP "/"+[Ordem do Documento]
   Else Print File ARQIMP "  "
EndIf

If [NotaC->Descricao CondPagto]="CONTRA APRESENTACAO"
   Then Print File ARQIMP Spaces(1)+"C.APRESENT"
   Else Print File ARQIMP Spaces(01)+AlinhM(LTrim(StrVal(Format("D13",[Data Vencimento]))),10)
EndIf

Print File ARQIMP "\n\n"
Print File ARQIMP Spaces(47) + Format("W11.2,AR",[Valor do Desconto])

Print File ARQIMP "\n\n\n"
Print File ARQIMP Spaces(32) + [Answer->Razao Social Fatura]+" - "+[Answer->Codigo]+"\n"
Print File ARQIMP Spaces(30) + Format("W25,AL",[Answer->Endereco Fatura])+" "+Format("W15,AL",[Answer->Bairro Fatura])
Print File ARQIMP  CI_15CPP
Print File ARQIMP Spaces(05) + ""+[Answer->CEP Fatura] + "\n"
Print File ARQIMP  CI_10CPP
Print File ARQIMP Spaces(30) + Format("W20,AL",[Answer->Cidade Fatura])
Print File ARQIMP Spaces(23) + [Answer->UF Fatura] +"\n"

If Not IsBlank([Answer->Endereco de Cobranca])
   Then Print File ARQIMP Spaces(32) + Format("W40,AL",[Answer->Endereco de Cobranca]) + "\n"
   Else Print File ARQIMP Spaces(32) + "O MESMO"+"\n"
EndIf

Print File ARQIMP Spaces(32)+"O MESMO"+"\n"
Print File ARQIMP Spaces(32) + Format("W18,AL",[Answer->CGC Fatura])
Print File ARQIMP Spaces(15)+[Answer->IE Fatura]+"\n\n"

ESCEXT([Valor Duplicata])

Print File ARQIMP Spaces(32)+SubStr(EXTENSO,001,46) + "\n"
Print File ARQIMP Spaces(32)+SubStr(EXTENSO,047,46) + "\n"
Print File ARQIMP Spaces(32)+SubStr(EXTENSO,094,46) + "\n"

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

Print File ARQIMP  CI_INEG

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

Print File ARQIMP "\n\n\n"

