Registrar y corregir ipprmt014 (Administracion Medidas)

- Registrar formulario ipfmmt014.per (faltaba)
- Corregir refresco de pantalla al eliminar (no mostraba estado 'E' hasta
  volver a consultar), confirmado por Johnny que debe verse al instante
- Agregar validacion para no permitir eliminar un registro ya eliminado
  (mostraba "REGISTRO ELIMINADO" de nuevo sin avisar)

Nota: el aviso de "ya eliminado" no sale centrado en pantalla - limitacion
del cliente grafico de Genero para dialogos lanzados desde pantallas tipo
MENU clasico (no aplica en pantallas DIALOG modernas). Aceptado por la
usuaria, no es bloqueante.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 12:28:56 -04:00
co-authored by Claude Sonnet 5
parent f163516115
commit 4ce1e7a03d
2 changed files with 34 additions and 17 deletions
+33 -17
View File
@@ -76,7 +76,8 @@ FUNCTION ippcad012()
END FUNCTION
FUNCTION ippcmf012()
DEFINE encontrados INTEGER
DEFINE encontrados INTEGER
DEFINE respuestaAviso STRING
## Aqui se prepara para la captura del criterio de seleccion
#WHENEVER ERROR CONTINUE
CONSTRUCT BY NAME criterio ON iptb00030.*
@@ -173,24 +174,39 @@ FUNCTION ippcmf012()
END INPUT
COMMAND KEY ("L") "eLiminar"
LET encontrados = 0
SELECT count(*) INTO encontrados
FROM iptb00002
WHERE cod_sec = iptb30.cod_sec AND status_t IS NULL
IF iptb30.status_t = "E" THEN
CALL fgl_winquestion(
"Aviso",
"Este registro ya fue eliminado anteriormente.",
"OK",
"OK",
"INFORMATION",
0)
RETURNING respuestaAviso
ELSE
LET encontrados = 0
SELECT count(*) INTO encontrados
FROM iptb00002
WHERE cod_sec = iptb30.cod_sec AND status_t IS NULL
IF encontrados = 0 THEN
UPDATE iptb00030 SET status_t = "E",
us_mod = SUSER_SNAME(),
fech_mod = GETDATE()
WHERE cod_sec = iptb30.cod_sec
IF encontrados = 0 THEN
UPDATE iptb00030 SET status_t = "E",
us_mod = SUSER_SNAME(),
fech_mod = GETDATE()
WHERE cod_sec = iptb30.cod_sec
LET numero_msg = 39
CALL msg(numero_msg)
ELSE
LET numero_msg = 383
CALL msg(numero_msg)
END IF
LET iptb30.status_t = "E"
LET iptb30.us_mod = usuarios
LET iptb30.fech_mod = CURRENT
DISPLAY BY NAME iptb30.*
LET numero_msg = 39
CALL msg(numero_msg)
ELSE
LET numero_msg = 383
CALL msg(numero_msg)
END IF
END IF
COMMAND "Retornar"
"Retorna al menu anterior"
+1
View File
@@ -512,6 +512,7 @@
<File filePath="ipdir/ipfmmt019.4fd"/>
<File filePath="ipdir/ipfmmt012.per"/>
<File filePath="ipdir/ipfmmt010.per"/>
<File filePath="ipdir/ipfmmt014.per"/>
</Library>
<Library binaryName="FUNCIONES_IP" dependencies="-1026233879" id="1763548104" label="FUNCIONES_IP">
<File filePath="ipdir/ipprgb000.4gl"/>