Commit inicial: fuentes MBS ERP (Genero 6) + .gitignore + docs/SETUP_PC_MBS.md

This commit is contained in:
2026-08-18 20:59:52 -04:00
commit 454973e269
5978 changed files with 2664094 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
IMPORT util
FUNCTION v_usuario(d)
DEFINE pusuarios RECORD
usuario,clave VARCHAR(50),
sesion VARCHAR(10)
END RECORD,
R RECORD
pERROR STRING,
pbodega SMALLINT
END RECORD,d STRING
TRY
CALL util.JSON.parse(d, pusuarios)
CATCH
LET r.pERROR = "FGL ERROR: ", err_get(status)
DISPLAY "fallo ",d
RETURN util.JSON.stringify(r.perror)
END TRY
CONNECT TO "smarmotech" USER pusuarios.usuario USING pusuarios.clave
IF STATUS < 0 THEN
LET r.perror = "USUARIO NO VALIDO"
ELSE
SELECT a.bodega INTO r.pbodega FROM seg0001 a WHERE a.usuario = pusuarios.usuario
LET r.perror = 'VALIDO'
END IF
DISCONNECT CURRENT
RETURN util.JSON.stringify(r)
END FUNCTION