144 lines
3.9 KiB
Plaintext
144 lines
3.9 KiB
Plaintext
{
|
|
-------------------------------------------------------------------
|
|
PROGRAMA : CPMNMT000
|
|
OBJETIVO : Menu de Mantenimientos del Sistema
|
|
de Cuentas por Pagar
|
|
PROGRAMADOR : Tadeo A. Ferreras.
|
|
FECHA REALIZACION : Junio 15, 1993.
|
|
--------------------------------------------------------------------
|
|
}
|
|
|
|
GLOBALS "cpprgb000.4gl"
|
|
|
|
FUNCTION cpmnmt000()
|
|
|
|
DEFINE p_user CHAR(9)
|
|
DEFINE luz CHAR(5)
|
|
OPTIONS
|
|
PROMPT LINE 8,
|
|
MESSAGE LINE 24
|
|
CLEAR SCREEN
|
|
CALL pantalla()
|
|
|
|
DISPLAY " Mantenimientos " AT 6,21
|
|
DISPLAY "cpmnmt000" AT 4,3 ATTRIBUTE(blue)
|
|
DISPLAY "1- Registro de Facturas Suplidores cpprmt001" AT 10,1
|
|
DISPLAY "2- Registro de pagos, NDs. y NCs. cpprmt002" AT 11,1
|
|
DISPLAY "3- Reclasificacion Facturas cpprmt004" AT 12,1
|
|
|
|
DISPLAY "S- Retorna Menu Anterior " AT 20,1
|
|
ATTRIBUTE (BOLD)
|
|
|
|
LET opcion = NULL
|
|
LABEL vuelve:
|
|
PROMPT " OPCION: " FOR opcion HELP 2
|
|
LET opcion = upshift(opcion)
|
|
|
|
IF opcion != "S" THEN
|
|
SELECT unique usuario INTO p_user FROM seg0001
|
|
WHERE usuario = user
|
|
CALL seg000(p_user,opcion,"cpmnmt000") RETURNING luz
|
|
IF luz = "roja" THEN
|
|
ERROR "NO TIENE PERMISO PARA UTILIZAR OPCION"
|
|
GOTO vuelve
|
|
END IF
|
|
as END IF
|
|
| A grammatical error has been found near "as".
|
|
| The construct is not understandable in its context.
|
|
| See error number -2018.
|
|
|
|
CASE
|
|
WHEN opcion = "1"
|
|
CALL cpprmt001()
|
|
CLEAR SCREEN
|
|
CALL cpmnmt000()
|
|
WHEN opcion = "2"
|
|
CALL cpprmt002()
|
|
CLEAR SCREEN
|
|
CALL cpmnmt000()
|
|
WHEN opcion = "3"
|
|
CALL cpprmt004()
|
|
CLEAR SCREEN
|
|
CALL cpmnmt000()
|
|
WHEN opcion = "S"
|
|
RETURN
|
|
OTHERWISE
|
|
CALL cpmnmt000()
|
|
END CASE
|
|
|
|
END FUNCTION
|
|
4{
|
|
| A grammatical error has been found near "4".
|
|
| The construct is not understandable in its context.
|
|
| See error number -2018.
|
|
----------------------------------------------------------------------------
|
|
PROGRAMA : PRD
|
|
OBJETIVO : Controlar las operaciones que se hagan anterior a una fecha
|
|
de corte.
|
|
REALIZADO POR : Ing. Juan Fco. Soto.
|
|
FECHA : Noviembre 4, 1992.
|
|
---------------------------------------------------------------------------
|
|
}
|
|
FUNCTION prd()
|
|
|
|
DEFINE otrab SMALLINT
|
|
DEFINE numero_msg INTEGER
|
|
DEFINE comp_fech,comp_fech1 DATE
|
|
DEFINE mes_control CHAR(2)
|
|
DEFINE mes_calc,dia SMALLINT
|
|
DEFINE fecha_c DATE
|
|
DEFINE c_ano,a_ano CHAR(4)
|
|
DEFINE usuario1 CHAR(9)
|
|
|
|
LET a_ano = year(today)
|
|
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)
|
|
|
|
SELECT MIN(fecha_corte) INTO fecha_c FROM prdtable
|
|
WHERE fecha_corte >= p_fechas
|
|
|
|
IF STATUS = NOTFOUND THEN
|
|
LET numero_msg = 57
|
|
CALL msg(numero_msg)
|
|
LET bandera = 1
|
|
END IF
|
|
LET dia = 0
|
|
SELECT MIN(dias_gracia) INTO dia FROM prdtable
|
|
WHERE fecha_corte = fecha_c
|
|
|
|
IF dia IS NULL THEN
|
|
LET dia = 0
|
|
END IF
|
|
|
|
SELECT UNIQUE a.usuario FROM seg0003 a
|
|
WHERE a.usuario = USER
|
|
|
|
IF STATUS != NOTFOUND THEN
|
|
LET fecha_c = fecha_c + dia
|
|
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
|