Files
DECOMARMOL/PROYECTOS/indir/inprfu000_1.4gl
T
2026-09-22 20:38:51 -04:00

60 lines
1.8 KiB
Plaintext

GLOBALS
"inprgb000.4gl"
FUNCTION desplega()
DECLARE jhonn CURSOR FOR
SELECT p.cod_n,p.cod_grupo,p.cod_tipo,p.cod_sec,p.cantidad_1,p.cantidad_2,
k.unidad_med,k.descrip_esp FROM intb00001 k,intb00006 p
WHERE
p.num_doc = datos_gen.num_doc and
p.cod_mov = datos_gen.cod_mov and
p.cod_n = k.cod_n and
p.cod_grupo = k.cod_grupo and
p.cod_tipo = k.cod_tipo and
p.cod_sec = k.cod_sec and
p.status_t is null and
k.status_t is null
OPEN jhonn
CALL integridad()
IF bandera = 1 THEN
LET bandera = 0
RETURN
END IF
LET idx = 1
FOREACH jhonn INTO movi[idx].*
CALL integridad()
IF bandera = 1 THEN
LET bandera = 0
RETURN
END IF
IF STATUS = NOTFOUND THEN
EXIT FOREACH
RETURN
END IF
IF opera1 = "S" THEN
LET movi[idx].cantidad_2 = movi[idx].cantidad_2 * -1
END IF
LET movi3[idx].codigo = movi[idx].cod_n using "&", "-",
movi[idx].cod_grupo using "&", "-",
movi[idx].cod_tipo using "&&","-",
movi[idx].cod_sec using "&&&"
LET movi3[idx].cantidad_1 = movi[idx].cantidad_1 using "##,###,###.##"
LET movi3[idx].cantidad_2 = movi[idx].cantidad_2 using "##,###,###.##"
LET movi3[idx].unidad_med = movi[idx].unidad_med
LET movi3[idx].descrip_esp = movi[idx].descrip_esp
LET movi3[idx].diferencia = movi[idx].cantidad_1 - movi[idx].cantidad_2
using "##,###,###.##"
LET idx = idx + 1
END FOREACH
CALL set_count(idx - 1)
END FUNCTION