Registra noprmt025 (Parametros ISR) y corrige tres bugs bloqueantes

Se agrega noprmt025 al proyecto usando nofmmt025.4fd (tiene los
campos monto_ars/monto_afp que faltan en el .per).

Se corrigen tres bugs que impedian usar el programa:
1. nopcmf023(): CONVERT(varchar,fecha,101) hacia variable DATE,
   mismo patron de error -1205 "Invalid month in date" ya visto en
   otros programas.
2. nopcad023(): la validacion de tipo_emp contra notb00010 usaba un
   SELECT sin INTO/cursor (singleton select), que exige exactamente
   una fila. notb00010 es la tabla de periodos de nomina (un registro
   por periodo), con cientos de filas por tipo_emp, asi que esta
   validacion fallaba siempre con error -284 "A subquery has returned
   not exactly one row", bloqueando por completo la opcion Nuevo. Se
   cambia a SELECT COUNT(*) INTO existe_tipo.
3. nofmmt025.4fd: el campo fecha (Edit widget, formonly) no tenia
   format="dd/mm/yyyy", causando que Genero interpretara la fecha
   tecleada con el formato de fecha por defecto del sistema en vez
   del formato dominicano, dando "Invalid month in date" al capturar
   un dia mayor a 12 como mes.

Probado ciclo completo: Nuevo, Buscar, Escoger y eLiminar sobre
parametro de prueba (numero_nomina=26).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Abel López
2026-09-25 12:30:28 -04:00
co-authored by Claude Sonnet 5
parent 303a722875
commit 750b9a6bcf
3 changed files with 13 additions and 7 deletions
+5
View File
@@ -482,6 +482,7 @@
<File filePath="nodir/nofmmt019.per"/> <File filePath="nodir/nofmmt019.per"/>
<File filePath="nodir/nofmmt023.4fd"/> <File filePath="nodir/nofmmt023.4fd"/>
<File filePath="nodir/nofmmt024.per"/> <File filePath="nodir/nofmmt024.per"/>
<File filePath="nodir/nofmmt025.4fd"/>
</Library> </Library>
<Library binaryName="FUNCIONES_NO" id="-306412216" label="FUNCIONES_NO"> <Library binaryName="FUNCIONES_NO" id="-306412216" label="FUNCIONES_NO">
<File filePath="nodir/noprgb000.4gl"/> <File filePath="nodir/noprgb000.4gl"/>
@@ -532,6 +533,10 @@
<Configuration commandLineArguments="alopez Lopez2023" id="-700000066" label="Configuration"/> <Configuration commandLineArguments="alopez Lopez2023" id="-700000066" label="Configuration"/>
<File filePath="nodir/noprmt024.4gl"/> <File filePath="nodir/noprmt024.4gl"/>
</Application> </Application>
<Application binaryName="noprmt025" dependencies="-1026233879,-764824792,-306412216,-335228674" id="-700000067" label="noprmt025">
<Configuration commandLineArguments="alopez Lopez2023" id="-700000068" label="Configuration"/>
<File filePath="nodir/noprmt025.4gl"/>
</Application>
</Group> </Group>
<Group id="1667448785" label="PRODUCTOS TERMINADOS"> <Group id="1667448785" label="PRODUCTOS TERMINADOS">
<Library binaryName="FORMULARIOS_IP" dependencies="-1026233879" id="-1826025351" label="FORMULARIOS_IP"> <Library binaryName="FORMULARIOS_IP" dependencies="-1026233879" id="-1826025351" label="FORMULARIOS_IP">
+1 -1
View File
@@ -33,7 +33,7 @@
<Label posX="40" posY="1" text="Monto Excento"/> <Label posX="40" posY="1" text="Monto Excento"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="monto_excento" columnCount="" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="notb00023.monto_excento" posX="55" posY="1" precisionDecimal="12" required="true" rowCount="" scaleDecimal="2" sqlTabName="notb00023" sqlType="DECIMAL" stepX="" stepY="" tabIndex="3" table_alias_name="" widget="Edit"/> <Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="monto_excento" columnCount="" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="notb00023.monto_excento" posX="55" posY="1" precisionDecimal="12" required="true" rowCount="" scaleDecimal="2" sqlTabName="notb00023" sqlType="DECIMAL" stepX="" stepY="" tabIndex="3" table_alias_name="" widget="Edit"/>
<Label posX="12" posY="2" text="Fecha"/> <Label posX="12" posY="2" text="Fecha"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="fecha" columnCount="" fieldId="2" gridHeight="1" gridWidth="10" name="fecha" posX="20" posY="2" rowCount="" sqlTabName="formonly" stepX="" stepY="" tabIndex="4" table_alias_name="" widget="Edit"/> <Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="fecha" columnCount="" fieldId="2" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fecha" posX="20" posY="2" rowCount="" sqlTabName="formonly" stepX="" stepY="" tabIndex="4" table_alias_name="" widget="Edit"/>
<Label posX="49" posY="2" text="15 %"/> <Label posX="49" posY="2" text="15 %"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="porc_15" columnCount="" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="notb00023.porc_15" posX="55" posY="2" precisionDecimal="12" required="true" rowCount="" scaleDecimal="2" sqlTabName="notb00023" sqlType="DECIMAL" stepX="" stepY="" tabIndex="5" table_alias_name="" widget="Edit"/> <Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="porc_15" columnCount="" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="notb00023.porc_15" posX="55" posY="2" precisionDecimal="12" required="true" rowCount="" scaleDecimal="2" sqlTabName="notb00023" sqlType="DECIMAL" stepX="" stepY="" tabIndex="5" table_alias_name="" widget="Edit"/>
<Label posX="49" posY="3" text="20 %"/> <Label posX="49" posY="3" text="20 %"/>
+7 -6
View File
@@ -7,8 +7,9 @@
FECHA REALIZACION : Friday, 15 December, 2000 FECHA REALIZACION : Friday, 15 December, 2000
------------------------------------------------------------------ ------------------------------------------------------------------
} }
GLOBALS "noprgb000.4gl" GLOBALS "noprgb000.4gl"
DEFINE relacion RECORD LIKE notb00023.* DEFINE relacion RECORD LIKE notb00023.*
DEFINE existe_tipo INTEGER
MAIN MAIN
DEFER INTERRUPT DEFER INTERRUPT
@@ -80,16 +81,16 @@ FUNCTION nopcad023()
NEXT FIELD tipo_emp NEXT FIELD tipo_emp
END IF END IF
SELECT a.* SELECT COUNT(*) INTO existe_tipo
FROM notb00010 a FROM notb00010 a
WHERE a.tipo_emp = relacion.tipo_emp WHERE a.tipo_emp = relacion.tipo_emp
AND a.status_t IS NULL AND a.status_t IS NULL
IF STATUS = NOTFOUND THEN IF existe_tipo = 0 THEN
LET numero_msg = 2 LET numero_msg = 2
CALL msg(numero_msg) CALL msg(numero_msg)
NEXT FIELD tipo_emp NEXT FIELD tipo_emp
END IF END IF
IF relacion.tipo_emp = "Q" AND IF relacion.tipo_emp = "Q" AND
relacion.numero_nomina <= 24 THEN relacion.numero_nomina <= 24 THEN
@@ -192,7 +193,7 @@ FUNCTION nopcmf023()
RETURN RETURN
END IF END IF
LET SELEC = "SELECT a.numero_nomina,a.tipo_emp,convert(varchar(10),a.fecha,101),a.monto_excento,", LET SELEC = "SELECT a.numero_nomina,a.tipo_emp,a.fecha,a.monto_excento,",
"a.porc_15,a.porc_20,a.porc_25,a.monto_ars,a.monto_afp FROM notb00023 a where ", "a.porc_15,a.porc_20,a.porc_25,a.monto_ars,a.monto_afp FROM notb00023 a where ",
" a.status_t is null and ", " a.status_t is null and ",
criterio clipped criterio clipped