;** Ed_0053  *******************************************************************
;*  Emissao de Duplicatas                           Curtume S. Sebastiao       *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 24/06/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_10CPP
Print File ARQIMP CI_6LPP

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

Print File ARQIMP Spaces(54) + AlinhM(LTrim(StrVal(Format("D09",[Answer->Data de Emissao]))),8)

If [Codigo da Empresa]<>"0003"
   Then Print File ARQIMP "  Empresa: "+[Codigo da Empresa] + "\n"
   Else Print File ARQIMP "\n"
EndIf

Print File ARQIMP "\n\n\n"

Print File ARQIMP Spaces(22)
Print File ARQIMP Format("W11,AC",NoNota[1])
Print File ARQIMP Format("W13.2,EIC,AR",[Valor Duplicata])
Print File ARQIMP Spaces(3)+Format("W6,AC",[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(3)+"C.APRESENT \n\n"
   Else Print File ARQIMP Spaces(3)+AlinhM(LTrim(StrVal(Format("D09",[Data Vencimento]))),8)+"\n\n"
EndIf

Print File ARQIMP Spaces(28) + Format("W29.2,EIC,AL",[Valor do Desconto])
Print File ARQIMP Format("D13",[Data Limite Desconto]) + "\n\n"

Print File ARQIMP Spaces(33) + [Answer->Condicoes Especiais]
VALOR_JUROS=([Valor Duplicata]*([Taxa de Juros]/[NDias Taxa de Juros]))/100
Print File ARQIMP "Juros: "+LTrim(Format("W7.2,EIC",VALOR_JUROS))
Print File ARQIMP "/Dia"+"\n\n"

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

Print File ARQIMP Spaces(31) + [Answer->Endereco Fatura]+"\n"

Print File ARQIMP Spaces(31) + Format("W37,AL",[Answer->Bairro Fatura])
Print File ARQIMP Substr(FONE,1,13) +"\n"

Print File ARQIMP Spaces(31) + Format("W27,AL",[Answer->Cidade Fatura])
Print File ARQIMP Format("W02,AL",[Answer->UF Fatura])+"         "+[Answer->CEP Fatura] + "\n"

Print File ARQIMP Spaces(31) + [Answer->Endereco de Cobranca] + "\n"

If Not IsBlank([Answer->Cidade de Cobranca])
   Then Print File ARQIMP Spaces(31) + [Answer->Cidade de Cobranca] + "/" + [Answer->UF de Cobranca]
        Print File ARQIMP " - " + [Answer->Cep de Cobranca] + "\n"
   Else Print File ARQIMP "\n"
EndIf

Print File ARQIMP Spaces(31) + Format("W28,AL",[Answer->CGC Fatura])
Print File ARQIMP Format("W15,AL",[Answer->IE Fatura])+"\n"

ESCEXT([Valor Duplicata])

Print File ARQIMP Spaces(29) + SubStr(EXTENSO,001,51) + "\n"
Print File ARQIMP Spaces(29) + SubStr(EXTENSO,052,51) + "\n"
Print File ARQIMP Spaces(29) + SubStr(EXTENSO,103,51) + "\n"

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

Print File ARQIMP CI_INEG

Print File ARQIMP "\n\n"

Print File ARQIMP CI_FNEG
If [Codigo da Empresa]<>"0003"
   Then Print File ARQIMP "\n\n\n"
Endif
