;** Rm_0110E *******************************************************************
;*  Cheques Pre-Datados e nao apresentados/Vencimento                          *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido    : 26/04/2018 por Anivel Augusto Rodrigues
;Ultima Alteracao:   /  /     por .

;*******************************************************************************
;* Rotina p/ Selecionar e Ordernar Registros                                   *
;*******************************************************************************
Proc SelecionaRM_0110E()

ClearAll
{Ask} {MovCont} Check
Moveto [Codigo da Empresa     ] TypeIn "~VSDGEMPRESA2.."
Moveto [Codigo da Conta       ] TypeIn "~VSDGCONTA.."
Moveto [Codigo do EmitDest    ] TypeIn "~VSDGDESTINAT.."
Moveto [Tipo da Conta         ] TypeIn "C"
Moveto [Tipo Movimento        ] TypeIn "S"
Moveto [Tipo de Operacao      ] TypeIn "05 or 08"
Moveto [Data Cheque Descontado] TypeIn "Blank"
Moveto [Cheque Pre-Datado     ] TypeIn "S"
Moveto [Data Cheque Pre-Datado] TypeIn ">=~VSDGDTINI, <=~VSDGDTFIM"
Do_It!
ClearAll

{Ask} {Answer} TypeIn "Fast Delete"
Moveto [Tipo de Operacao  ] TypeIn "08"
Moveto [Tipo do Lancamento] TypeIn "O or P"
Do_It!
ClearAll

EndProc   

;*******************************************************************************
;* Rotina Principal                                                            *
;*******************************************************************************
Proc ProcessaRM_0110E()

SelecionaRM_0110E()

If IsEmpty("Answer")
   Then 
        MENSAGEM("N„o existem registros a processar")
   else
        ;***** Ajusta Dados ************************************
        If VSDGEMPRESA="0000"
           Then {Ask} TypeIn Tabela Enter TypeIn "Fast"
                Moveto [Codigo da Empresa      ] TypeIn "changeto 0000"
                Moveto [Nome Fantasia Empresa  ] TypeIn "changeto TOTALIZA EMPRESAS"
                Do_It!
                ClearAll
        EndIf
   
        CopyReport "\\Base\\Sistemas\\Ctacor\\Rm_0120" "3" "Answer" "R"
        IMPRIREL("Answer","R")
EndIf

EndProc

;-- Chamada principal ----------------------------------------------------------
ProcessaRM_0110E()

Release Procs ProcessaRM_0110E, SelecionaRM_0110E

