Files
MBS/PROYECTO/tedir/temnrp000.old.txt
T

197 lines
5.2 KiB
Plaintext

{
----------------------------------------------------------------
PROGRAMA : TEMNRP000
OBJETIVO : Menu de Reporte del Sistema de tesoreria
PROGRAMADOR : Ing. Juan F. Soto.
FECHA REALIZACION : Junio 15, 1993.
----------------------------------------------------------------
}
GLOBALS "teprgb000.4gl"
MAIN
DEFER INTERRUPT
CALL pantalla()
CALL temnrp000()
END MAIN
FUNCTION temnrp000()
OPTIONS
PROMPT LINE 8,
MESSAGE LINE 24
CLEAR SCREEN
CALL pantalla()
LET impresor = FGL_GETENV("IMP")
DISPLAY " Reportes " AT 6,24 ATTRIBUTE(BLACK)
DISPLAY "temnrp000" AT 4,3 ATTRIBUTE(RED)
DISPLAY " 1-Validacion de Depositos teprrp001" AT 10,1
DISPLAY " 2-Comision Por Ventas teprrp002" AT 11,1
DISPLAY " 3-Comision Por Cobros teprrp003" AT 12,1
DISPLAY " 4-Estados de Cuentas teprrp004" AT 13,1
DISPLAY " 5-Comision/Cobro Plan Ranch teprrp005" AT 14,1
DISPLAY " 6-Valid. Cheques Devueltos teprrp006" AT 15,1
DISPLAY " 7-Relacion Cheques Emitidos teprrp007" AT 16,1
DISPLAY " 8-C-F Compar. Real/Estimado teprrp008" AT 17,1
DISPLAY " 9-C-F Real Diario/Acumulado teprrp009" AT 18,1
DISPLAY "10-C-F Real Comp. Tres Anos teprrp010" AT 19,1
DISPLAY "11-Panoramico Cash Flow Real teprrp011" AT 20,1
DISPLAY "12-Panoram. Cash Flow Estim. teprrp012" AT 10,40
DISPLAY "13-Maestra de Partidas C. F. teprrp013" AT 11,40
DISPLAY "14-Cheques Emitido x Partida teprrp014" AT 12,40
DISPLAY "S- Retorna Menu Anterior " AT 21,28
ATTRIBUTE (BLACK)
LABEL vuelve:
LET opcion = NULL
PROMPT " OPCION: " FOR opcion
LET opcion = opcion CLIPPED
LET opcion = UPSHIFT(opcion)
IF opcion != "S" THEN
SELECT unique usuario INTO p_user FROM seg0001
WHERE usuario = user
CALL seg000(opcion,"temnrp000") RETURNING luz
IF luz = "roja" THEN
ERROR "NO TIENE PERMISO PARA UTILIZAR OPCION"
GOTO vuelve
END IF
END IF
CASE
WHEN opcion = "1"
CALL teprrp001()
CALL temnrp000()
WHEN opcion = "2"
CALL teprrp002()
CALL temnrp000()
WHEN opcion = "3"
CALL teprrp003()
CALL temnrp000()
WHEN opcion = "4"
CALL teprrp004()
CALL temnrp000()
WHEN opcion = "5"
CALL teprrp005()
CALL temnrp000()
WHEN opcion = "6"
CALL teprrp006()
CALL temnrp000()
WHEN opcion = "7"
CALL teprrp007()
CALL temnrp000()
WHEN opcion = "8"
CALL teprrp008()
CALL temnrp000()
WHEN opcion = "9"
CALL teprrp009()
CALL temnrp000()
WHEN opcion = "10"
CALL teprrp010()
CALL temnrp000()
WHEN opcion = "11"
CALL teprrp011()
CALL temnrp000()
WHEN opcion = "12"
CALL teprrp012()
CALL temnrp000()
WHEN opcion = "13"
CALL teprrp013()
CALL temnrp000()
WHEN opcion = "14"
CALL teprrp014()
CALL temnrp000()
WHEN opcion = "S"
RETURN
OTHERWISE
CALL temnrp000()
END CASE
END FUNCTION
FUNCTION pantalla()
DEFINE fecha CHAR(8),
hora char(5)
LET fecha = today USING "dd/mm/yy"
LET hora = time
DISPLAY " R A Y . O . V A C D O M I N I C A N A " AT 4,19
ATTRIBUTE (REVERSE,BLUE)
DISPLAY fecha AT 4,70 ATTRIBUTE (RED)
DISPLAY " Sistema de Tesoreria " AT 5,25 ATTRIBUTE(BLACK)
DISPLAY hora AT 6,73 ATTRIBUTE(RED)
CALL fgl_drawbox(5,79,3,1)
CALL fgl_drawbox(1,79,22,1)
END FUNCTION
FUNCTION integridad()
IF sqlca.sqlcode < 0 THEN
LET numero_msg = sqlca.sqlcode
CALL msg(numero_msg)
DISPLAY numero_msg AT 23,70
LET bandera = 1
LET status = 0
SLEEP 2
RETURN
END IF
RETURN
END FUNCTION
FUNCTION prd()
LET a_ano = year(p_fechas)
LET mes_control = MONTH(today)
LET mes_calc = mes_control
IF mes_calc = 01 THEN
LET mes_calc = 13
LET a_ano = year(today - 32)
END IF
#Aqui la funcion se posicionaba en dos meses para el control del documento
#LET mes_calc = mes_calc - 2
IF mes_calc <= 0 THEN
LET mes_calc = 12
LET a_ano = year(today) - 1
END IF
LET c_ano = year(today)
{IF a_ano != c_ano THEN
LET numero_msg = 59
CALL msg(numero_msg)
LET bandera = 1
RETURN
END IF}
SELECT MIN(fecha_corte) INTO fecha_c FROM prdtable
WHERE fecha_corte >= p_fechas
SELECT MIN(dias_gracia) INTO dia FROM prdtable
WHERE fecha_corte = fecha_c
IF dia IS NULL THEN
LET dia = 0
END IF
SELECT a.usuario FROM seg0003
WHERE a.usuario = USER
IF status != notfound THEN
LET fecha_c = fecha_c + dia
END IF
IF status = notfound THEN
LET numero_msg = 58
CALL msg(numero_msg)
LET bandera = 1
END IF
LET comp_fech = fecha_c
LET comp_fech1 = TODAY
IF comp_fech < comp_fech1 THEN
LET numero_msg = 57
CALL msg(numero_msg)
LET bandera = 1
END IF
END FUNCTION