Corregir ipprmt010: campos de usuario/fecha/estado enlazados a tabla equivocada
- El formulario ipfmmt010.per tenia los campos Usuario Creador/Modificador, Fecha Creacion/Modificacion y el indicador de estado enlazados a iptb00020 (tabla de Grupos, ajena a este programa) en vez de iptb00024 (Tipos de Productos) - copiado por error del formulario de otro programa - La consulta en ipprmt010.4gl tampoco seleccionaba esas columnas - Al eliminar, el registro en memoria y la pantalla no se actualizaban con el nuevo estado, solo la base de datos Confirmado por Johnny que el estado 'E' debe reflejarse en pantalla al eliminar. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,15 +14,15 @@ LAYOUT (TEXT="TIPOS PRODUCTOS")
|
||||
}
|
||||
end
|
||||
tables
|
||||
iptb00020,iptb00024
|
||||
iptb00024
|
||||
attributes
|
||||
f006 = iptb00024.cod_tipo;
|
||||
f007 = iptb00024.descripcion,upshift;
|
||||
b = iptb00020.status_t,noentry;
|
||||
f002 = iptb00020.us_crea,noentry;
|
||||
f003 = iptb00020.fech_crea,noentry;
|
||||
f004 = iptb00020.us_mod,noentry;
|
||||
f005 = iptb00020.fech_mod,NOENTRY;
|
||||
b = iptb00024.status_t,noentry;
|
||||
f002 = iptb00024.us_crea,noentry;
|
||||
f003 = iptb00024.fech_crea,noentry;
|
||||
f004 = iptb00024.us_mod,noentry;
|
||||
f005 = iptb00024.fech_mod,NOENTRY;
|
||||
COMBOBOX inv = formonly.cod_inv,ITEMS=(("3","PRODUCTOS TERMINADOS"),("1","MATERIA PRIMA"),("7","REPUESTOS")),DEFAULT=3;
|
||||
instructions
|
||||
delimiters
|
||||
|
||||
@@ -105,7 +105,7 @@ FUNCTION ippcmf010()
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
LET SELEC = " SELECT UNIQUE a.cod_tipo,a.descripcion,a.cod_inv FROM iptb00024 a WHERE ",
|
||||
LET SELEC = " SELECT UNIQUE a.* FROM iptb00024 a WHERE ",
|
||||
criterio clipped,
|
||||
" ORDER BY a.cod_tipo"
|
||||
|
||||
@@ -120,7 +120,7 @@ FUNCTION ippcmf010()
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv,p_iptb24.status_t,p_iptb24.us_crea,p_iptb24.fech_crea,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
MENU "OPCIONES "
|
||||
COMMAND "Siguiente"
|
||||
@@ -131,7 +131,7 @@ FUNCTION ippcmf010()
|
||||
CALL msg(numero_msg)
|
||||
END IF
|
||||
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv,p_iptb24.status_t,p_iptb24.us_crea,p_iptb24.fech_crea,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
COMMAND "Anterior"
|
||||
"Presenta en pantalla el registro anterior encontrado"
|
||||
@@ -141,13 +141,13 @@ FUNCTION ippcmf010()
|
||||
CALL msg(numero_msg)
|
||||
END IF
|
||||
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv,p_iptb24.status_t,p_iptb24.us_crea,p_iptb24.fech_crea,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
COMMAND "Primero"
|
||||
"Presenta en pantalla el primer registro encontrado"
|
||||
FETCH FIRST datos INTO p_iptb24.*
|
||||
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv,p_iptb24.status_t,p_iptb24.us_crea,p_iptb24.fech_crea,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
LET numero_msg = 5
|
||||
CALL msg(numero_msg)
|
||||
@@ -156,7 +156,7 @@ FUNCTION ippcmf010()
|
||||
"Presenta en pantalla el ultimo registro encontrado"
|
||||
FETCH LAST datos INTO p_iptb24.*
|
||||
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv
|
||||
DISPLAY BY NAME p_iptb24.cod_tipo,p_iptb24.descripcion,p_iptb24.cod_inv,p_iptb24.status_t,p_iptb24.us_crea,p_iptb24.fech_crea,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
LET numero_msg = 4
|
||||
CALL msg(numero_msg)
|
||||
@@ -196,6 +196,10 @@ FUNCTION ippcmf010()
|
||||
fech_mod = GETDATE()
|
||||
WHERE @cod_tipo = p_iptb24.cod_tipo
|
||||
|
||||
LET p_iptb24.status_t = "E"
|
||||
LET p_iptb24.us_mod = usuarios
|
||||
LET p_iptb24.fech_mod = CURRENT
|
||||
DISPLAY BY NAME p_iptb24.status_t,p_iptb24.us_mod,p_iptb24.fech_mod
|
||||
|
||||
LET numero_msg = 39
|
||||
CALL msg(numero_msg)
|
||||
|
||||
Reference in New Issue
Block a user