;** Ch_bobA ********************************************************************
;*  Emissao de Cheques Bancoob Avulso                                         *
;*******************************************************************************
;Autor: Visao/Vise
;Desenvolvido    : 05/11/2002 por Karen Lauar Nery
;Ultima Alteracao: 14/07/2003 por Karen Lauar Nery
;Motivo Alteracao: Mudanca CI
;Ultima Alteracao: 01/11/2011 por Bruno Carvalho
;Motivo Alteracao: Ajustes para trabalhar em Video ou ImpressÆo


;*******************************************************************************
Proc IMPHIST()
  ESCEXT(CH_Valor)
  Print File ARQIMP CI_8LPP
   Print File ARQIMP Spaces(50)+"#"+Ltrim(Format("W11.2,EIC",(CH_Valor)))+"#"+"\n\n\n"
   Print File ARQIMP Spaces(12)+SubStr(EXTENSO,1,52)+"\n\n"
   Print File ARQIMP Spaces(03)+SubStr(EXTENSO,53,61)+"\n\n"
   Print File ARQIMP Spaces(04)+CH_Destino+"\n\n"
   Print File ARQIMP Spaces(27)+Format("W15,AR",CH_Cidade)+"   "+StrVal(Day(CH_Data))+Spaces(02)+Format("W12,AC",MESEXT(MONTH(CH_Data)))
   Print File ARQIMP Spaces(02)+StrVal(Substr(Year(CH_Data),3,4))+"\n"
   Print File ARQIMP CI_6LPP
   
EndProc
;*******************************************************************************
;* Rotina Principal                                                            *
;*******************************************************************************
ArqImp=PrivDir()+"CH_BOBA.Txt"
If IsFile(ArqImp)
   Then Deleta_Arquivo(ARQIMP)
EndIf

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

;---- Imprime Arquivo Impressao ------------------------------------------------
ImpriArq(ARQIMP)
Deleta_Arquivo(ARQIMP)

LIMPAGUARDE()

Release Procs IMPHIST