;** Ed_0006   ******************************************************************
;*  Emissao de Duplicatas                             C.R CONFECCOES           *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 16/10/2003 por Karen Lauar Nery
;Ultima Alteracao: 21/10/2003 por Karen Lauar Nery
;Motivo Alteracao: Ajustes

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

Print File ARQIMP Chr(27)+Chr(18)
Print File ARQIMP Chr(27)+Chr(50)

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

Print File ARQIMP Spaces(62) + AlinhM(LTrim(StrVal(Format("D13",[Answer->Data de Emissao]))),10)+"\n"

Print File ARQIMP "\n\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(05)+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"
   Else Print File ARQIMP Spaces(1)+AlinhM(LTrim(StrVal(Format("D13",[Data Vencimento]))),10)+"\n"
EndIf

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[1])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[1]) + "\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[2])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[2])

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

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[3])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[3])

Print File ARQIMP Spaces(19) + Format("W19,AR",[Answer->Condicoes Especiais])
Print File ARQIMP Spaces(04)+ [Answer->Nome Fantasia Represent]+"\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[4])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[4])+"\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[5])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[5])
Print File ARQIMP Spaces(13) + [Answer->Razao Social Fatura]+" - "+[Answer->Codigo]+"\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[6])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[6])
Print File ARQIMP Spaces(13) + [Answer->Endereco Fatura]
Print File ARQIMP Spaces(03) + Format("W17,AL",[Answer->Bairro Fatura])+"\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[7])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[7])
Print File ARQIMP Spaces(13) + Format("W27,AL",[Answer->Cidade Fatura])
Print File ARQIMP Spaces(07) + [Answer->UF Fatura]
Print File ARQIMP Spaces(02) + [Answer->CEP Fatura]+"\n"

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[8])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[8])
If Not IsBlank([Answer->Cidade de Cobranca])
   Then Print File ARQIMP Spaces(13) + [Answer->Cidade de Cobranca] + "/" + [Answer->UF de Cobranca]+ "-"+[Answer->CEP de Cobranca]+"\n"
   Else Print File ARQIMP "\n"
EndIf

Print File ARQIMP Spaces(5)+Format("W6,AR",NoNota[9])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[9])
Print File ARQIMP Spaces(13) + [Answer->Endereco de Cobranca]
Print File ARQIMP Spaces(03) + [Answer->Bairro de Cobranca  ]+"\n"

Print File ARQIMP Spaces(1)+Format("W6,AR",NoNota[11])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[11])
Print File ARQIMP Spaces(17) + Format("W28,AL",[Answer->CGC Fatura])
Print File ARQIMP Spaces(05) + [Answer->IE Fatura]+"\n"

ESCEXT([Valor Duplicata])

Print File ARQIMP Spaces(3)+Format("W6,AR",NoNota[10])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[10]) +"\n"

Print File ARQIMP Spaces(3)+Format("W6,AR",NoNota[11])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[11])
Print File ARQIMP Spaces(14) + SubStr(EXTENSO,001,46) + "\n"

Print File ARQIMP Spaces(3)+Format("W6,AR",NoNota[12])
Print File ARQIMP Format("W11.2,EIC,AR",VrNota[12])
Print File ARQIMP Spaces(14) + SubStr(EXTENSO,047,46) + "\n"

Print File ARQIMP Spaces(34) + SubStr(EXTENSO,096,46) + "\n"

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

Print File ARQIMP  Chr(27)+ Chr(69)
Print File ARQIMP "\n\n"
Print File ARQIMP Chr(27)+ Chr(70)

Print File ARQIMP "\n\n\n"

