JSOTO QA G6 (.250): arreglos CG/Activos/Repuestos/Informatica, DBDATE, imagenes de reportes y cgprrp008

Programas (bugs encontrados en las pruebas funcionales en la .250):
- acprmt004/acprmt005: MIN/MAX sobre la fecha real (no sobre texto CONVERT 103); acprmt004 alinea rowid.
- cgprrp008: lee cgtb00004 (no la copia cgtb00004_tmp del 14-mar-2026) y solo regenera
  cgtb00016 cuando se corre sin filtro de cuenta.
- cgprrp014: CONSTRUCT con los nombres de campo del form (cod_sp_sc).
- cgfmrp013: defaultValue del combo = cgprrp012.4rp.
- cgprrp022/edprrp029: salida getPreviewDevice() en lugar de SVG fijo.
- edprrp080: no consume numero ED con afecta = NO.
- cgprmt004/022/037, segprmt0001: sin CONNECT "IFMX" (-6366); EXTERIOR via cross-DB.
- irprcs001: agrega CONNECT; irprmt021: columna idestado; irprmt066: la anulacion sin
  MaintainX ya no se deshace (-255); otrodir/bodegas: rama '2' llena origen y destino.
- teprmt001: ajustes G6.

Despliegue G6:
- DBDATE=dmy4 en config/Application.xcf, config/Main_prg.xcf, resources/Application.xcf
  y en el grupo MODULOS del .4pw (los programas lanzados por el menu heredan el entorno).
- 31 .4rp: IMAGEBOX con rutas absolutas file:///E:|F:|C: -> relativas IMAGENES/...;
  se agregan IMAGENES/LOGO.JPG y genero_logo.png.
- Paquete mbs: incluye bin/*.4rp y bin/IMAGENES (antes el GAR no llevaba los reportes).
- resources/TopMenu.4st (irprcs008 daba -8014); bin/cgprcs024.4rp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 15:30:24 -04:00
co-authored by Claude Opus 5.5
parent 95aa24c029
commit 705fadfdb4
57 changed files with 358 additions and 208 deletions
+71 -54
View File
@@ -374,63 +374,17 @@ FUNCTION tepcad001()
INPUT ARRAY documentos FROM record4.* ATTRIBUTES(WITHOUT DEFAULTS)
BEFORE INPUT
# LET suma=0
IF tt_recibos != deposito.monto THEN
CALL fgl_winmessage(
"ERROR",
"CANTIDAD DE RECIBOS DIFERENTE AL MONTO DEL DEPOSITO",
"STOP")
-- G6: en GBC esta grilla (solo lectura) puede no recibir foco; la carga
-- vive en llena_documentos() y se repite al guardar
IF NOT llena_documentos() THEN
NEXT FIELD check1
END IF
FOR idx = 1 TO recibos.getLength()
IF recibos[idx].check1 = "S" THEN
IF recibos[idx].documento1 IS NOT NULL THEN
LET documentos[idx].fecha = recibos[idx].fecha_doc
LET documentos[idx].documento =
recibos[idx].documento1
LET documentos[idx].tipo_cliente =
recibos[idx].tipo_cliente1
LET documentos[idx].sec_cliente =
recibos[idx].sec_cliente1
LET documentos[idx].cliente =
recibos[idx].nom_cliente
LET documentos[idx].tipodocumento =
recibos[idx].tipo_doc
IF recibos[idx].valor1 < 0 THEN
LET documentos[idx].valor =
recibos[idx].valor1 * -1
ELSE
LET documentos[idx].valor = recibos[idx].valor1
END IF
IF documentos[idx].documento IS NULL THEN
CALL documentos.clear()
END IF
END IF
# IF recibos[idx].check1="S" THEN
# END IF
END IF
END FOR
IF total IS NULL THEN
LET total = 0
END IF
#IF suma IS NULL THEN
LET suma = 0
#END IF
FOR idx = 1 TO documentos.getLength()
LET suma = suma + documentos[idx].valor
END FOR
DISPLAY BY NAME suma
END INPUT
ON ACTION guardar
-- G6: asegurar el detalle aunque la grilla nunca haya recibido foco
IF NOT llena_documentos() THEN
NEXT FIELD check1
END IF
SELECT num_doc INTO deposito.num_doc FROM tetb00009
@@ -441,7 +395,7 @@ FUNCTION tepcad001()
END IF
DISPLAY BY NAME deposito.num_doc
IF suma != deposito.monto THEN
IF suma IS NULL OR suma = 0 OR suma != deposito.monto THEN -- G6: NULL pasaba la validacion
CALL fgl_winmessage(
"ERROR",
"EL VALOR SUMADO DE LOS RECIBOS NO PUEDE SER DIFERENTE AL MONTO DEL DEPOSITO",
@@ -1275,3 +1229,66 @@ FUNCTION prd(p_fechas, puser)
RETURN bandera
END FUNCTION
# G6: copia los recibos marcados (check1='S') a documentos y totaliza en suma.
# Devuelve FALSE si el total de recibos no cuadra con el monto del deposito.
FUNCTION llena_documentos()
CALL documentos.clear()
# LET suma=0
IF tt_recibos != deposito.monto THEN
CALL fgl_winmessage(
"ERROR",
"CANTIDAD DE RECIBOS DIFERENTE AL MONTO DEL DEPOSITO",
"STOP")
RETURN FALSE
END IF
FOR idx = 1 TO recibos.getLength()
IF recibos[idx].check1 = "S" THEN
IF recibos[idx].documento1 IS NOT NULL THEN
LET documentos[idx].fecha = recibos[idx].fecha_doc
LET documentos[idx].documento =
recibos[idx].documento1
LET documentos[idx].tipo_cliente =
recibos[idx].tipo_cliente1
LET documentos[idx].sec_cliente =
recibos[idx].sec_cliente1
LET documentos[idx].cliente =
recibos[idx].nom_cliente
LET documentos[idx].tipodocumento =
recibos[idx].tipo_doc
IF recibos[idx].valor1 < 0 THEN
LET documentos[idx].valor =
recibos[idx].valor1 * -1
ELSE
LET documentos[idx].valor = recibos[idx].valor1
END IF
IF documentos[idx].documento IS NULL THEN
CALL documentos.clear()
END IF
END IF
# IF recibos[idx].check1="S" THEN
# END IF
END IF
END FOR
IF total IS NULL THEN
LET total = 0
END IF
#IF suma IS NULL THEN
LET suma = 0
#END IF
FOR idx = 1 TO documentos.getLength()
LET suma = suma + documentos[idx].valor
END FOR
DISPLAY BY NAME suma
RETURN TRUE
END FUNCTION