Commit inicial: fuentes MBS ERP (Genero 6) + .gitignore + docs/SETUP_PC_MBS.md
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
FUNCTION actualizareqtrx(pnumdoc)
|
||||
DEFINE pnumdoc INT,
|
||||
cantidad_trx,cantidad_req_trx DEC(12,5),
|
||||
cerrar BOOLEAN
|
||||
|
||||
|
||||
#SUMA LA CANTIDAD EN LA TABLA DE TRANSACCIONES INVENTARIOS
|
||||
|
||||
SELECT ISNULL(SUM(a.cantidad_2),0) INTO cantidad_trx FROM iptb00006 a
|
||||
WHERE a.numero_Doc = pnumdoc AND a.status_t IS NULL
|
||||
|
||||
IF cantidad_trx < 0 THEN
|
||||
LET cantidad_trx = cantidad_trx * -1
|
||||
END IF
|
||||
#SUMA LA CANTIDAD EN LAS REQUISICIONES
|
||||
|
||||
SELECT ISNULL(SUM(a.cantidad_2),0) INTO cantidad_req_trx FROM iptb00058 a
|
||||
WHERE a.numero_Doc = pnumdoc
|
||||
|
||||
DISPLAY "cantidades ",cantidad_trx," ",cantidad_req_trx
|
||||
IF cantidad_trx >= cantidad_req_trx THEN
|
||||
LET cerrar = TRUE
|
||||
ELSE
|
||||
LET cerrar = FALSE
|
||||
END IF
|
||||
|
||||
RETURN cerrar
|
||||
|
||||
|
||||
END FUNCTION
|
||||
Reference in New Issue
Block a user