;** CH_237 *********************************************************************
;*  Emissao de Cheques BRADESCO Avulso                                         *
;*******************************************************************************
;Autor: Visao/Vise
;Desenvolvido    : 11/11/2011 por Bruno Carvalho
;Ultima Alteracao: 16/11/2011 por Karina Andrade 
;Motivo Alteracao: Impressao em Serial somente SYS_CODIGO_CLIENTE="0079"
;Ultima Alteracao: 09/01/2012 por Humberto  
;Motivo Alteracao: Substituido SYS_CODIGO_CLIENTE por SETA_PRINTER

;*******************************************************************************
Proc IMPHIST()

Print File ARQIMP CI_8LPP

Print File ARQIMP "\n"
ESCEXT(CH_Valor)
Print File ARQIMP Spaces(75)+"#"+LTrim(Format("W11.2,EIC",(CH_Valor)))+"#"+"\n\n\n"
Print File ARQIMP Spaces(14)+SubStr(EXTENSO,1,85)+"\n\n"
Print File ARQIMP Spaces(06)+SubStr(EXTENSO,86,82)+"\n\n"
Print File ARQIMP Spaces(07)+CH_Destino+"\n\n"
Print File ARQIMP Spaces(46)+Format("W15,AR",CH_Cidade)+"    "+StrVal(Day(CH_Data))+Spaces(8)+Format("W10,AC",MESEXT(MONTH(CH_Data)))
Print File ARQIMP Spaces(08)+StrVal(Substr(Year(CH_Data),3,4))+"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
Print File ARQIMP CI_6LPP

EndProc       

;*******************************************************************************
;* Rotina Principal                                                            *
;*******************************************************************************
ArqImp=PrivDir()+"CH_BB.Txt"
If IsFile(ArqImp)
   Then Deleta_Arquivo(ARQIMP)
EndIf

AGUARDE("Imprimindo Cheque...")
IMPHIST()

;---- Imprime Arquivo Impressao ------------------------------------------------
If Seta_Printer<>""
  Then ImpriSerial(ArqImp,Seta_Printer)
  Else ImpriArq(ARQIMP)
       Deleta_Arquivo(ARQIMP) 
EndIf

LIMPAGUARDE()

Release Procs IMPHIST
