Files
MBS/PROYECTO/cgdir/cgcuadrada.4gl
T

32 lines
707 B
Plaintext

{
FUNCTION : Verificdar si la entrada al diario generada esta cuadrada
DESARROLLADO POR : Ing. Juan Soto
FECHA DESARROLLO : JUNIO 06, 2026
}
FUNCTION verificaCuadre(entrada)
DEFINE
entrada VARCHAR(25),
valor DEC(18, 2),
cuadrada BOOLEAN
SELECT DISTINCT ref FROM cgtb00004 a WHERE a.ref = entrada
IF STATUS = NOTFOUND THEN
RETURN TRUE
END IF
SELECT SUM(a.debito - a.credito)
INTO valor
FROM cgtb00004 a
WHERE a.ref = entrada
IF valor = 0 THEN
LET cuadrada = TRUE
ELSE
LET cuadrada = FALSE
END IF
RETURN cuadrada
END FUNCTION