Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DanielRivera03/SistemaBancario/llms.txt

Use this file to discover all available pages before exploring further.

All database operations in CashMan H.A. are executed exclusively through the 148 stored procedures defined in ScriptSQL/Stored Procedure/sp_cashmanha.sql. No inline SQL exists in any PHP controller or model file — every read, write, and update goes through a CALL statement. This keeps business logic at the database layer, simplifies auditing, and prevents SQL injection by design.

PHP Call Pattern

Procedures are invoked using mysqli_query with a CALL string. The connection object ($this->conexion or $conectarsistema) is passed as the first argument:
$result = mysqli_query(
    $this->conexion,
    "CALL ConsultarConfiguracionCuentaUsuarios($idUsuario)"
);
Parameters are interpolated directly into the call string from validated PHP session or POST variables. Example from the session init model:
$resultado = mysqli_query(
    $conectarsistema,
    "CALL IniciarSesion('$usuario', '$contrasenia');"
);

Procedures by Domain

ProcedureParametersPurpose
IniciarSesionUsuario VARCHAR(255), Pass VARCHAR(255)Validate login credentials and return user record
RegistrarAccesosUsuarios_dispositivo VARCHAR(255), _sistemaoperativo VARCHAR(255), _idusuarios INTAppend a login audit row to accesos
CambioContraseniaRecuperacion_contrasenia VARCHAR(255), _correo VARCHAR(255)Update password for a given email address
CambioEstadoToken_correo VARCHAR(255), _token VARCHAR(255), _codigo INT, _estado VARCHAR(15)Mark a recovery token as usado
ProcedureParametersPurpose
ConsultarCorreoRecuperacion_correo VARCHAR(255)Check if an email address exists in usuarios
VerificarCodigoSeguridad_codigo INT, _correo VARCHAR(255), _token VARCHAR(255)Validate a one-time recovery code (returns row if unused)
ReestablecerContrasenias_correo VARCHAR(255), _token VARCHAR(255), _codigo INTReset flow verification (multi-step BEGIN…END body)
ProcedurePurpose
RegistrarNuevosClientesAdministradoresInsert a new user into usuarios with role and registering employee
RegistrarDetallesUsuarios_ClientesInsert the full KYC profile row into detalleusuarios
ConsultarNumeroUsuariosReturn all rows from vista_configuracionusuariosgeneral (admin dashboard counter)
ConsultaGeneralUsuariosRegistradosList active users with complete profile (completoperfil='si', estado_usuario='activo')
ConsultaGeneralUsuariosInactivosList inactive users with complete profile
ConsultaGeneralUsuariosBloqueadosList blocked users with complete profile
ConsultaUsuariosPerfilIncompletoList users with incomplete profiles registered by a given employee
ConsultaGeneralCompletaUsuariosReturn full user + detail record for a specific idusuarios
ConsultarPerfilUsuariosReturn profile view for a given user (self-service)
ModificarConfiguracionCuentaUsuarios_AdministradoresEdit user account fields including role and status (admin-only)
ModificarDetallesUsuarios_ClientesUpdate detalleusuarios including all document photo filenames
ActualizarDetallesUsuariosSelf-service update of personal details (no document photos)
ActualizarConfiguracionCuentasAdministradoresConFotoUpdate admin account including new profile photo
ActualizarConfiguracionCuentasAdministradoresSinFotoUpdate admin account without changing photo
DesactivarUsuarios_ClientesSet estado_usuario='inactivo'
BloquearUsuarios_ClientesSet estado_usuario='bloqueado'
ReactivarUsuarios_ClientesSet estado_usuario='activo'
ActualizacionDatosCuenta_InicioSesionUsuariosPrimeraVezUpdate username and password on first login
ProcedureParametersPurpose
RegistroNuevosRolesDeUsuarios_nombrerol, _descripcionrolCreate a new role
ModificarRolesUsuarios_idrol, _nombrerol, _descripcionrolUpdate an existing role
EliminarRolesUsuarios_idrol INTDelete a role by ID
ConsultaCompletaRolesDeUsuariosRegistradosList all roles
ProcedurePurpose
IngresoSolicitudNuevosPrestamosClientes_NuevasAsignacionesSubmit a new credit application into creditos
ActualizacionDatosNuevasSolicitudesCreditos_PrimeraRevisionSave Gerencia’s first review decision (state, rates, schedule, notes)
ActualizacionRevisionFinalPresidencia_SolicitudCreditoClientesSave Presidencia’s final approval or denial
ActualizacionSaldoCreditosClientes_ReestructuracionSolicitudesRecalculate balance on restructured credit
RegistrarCuotasMensualesNuevosCreditosClientesInsert one installment row into cuotas (called once per month of term)
RegistrarCuotasMensualesHistoricoCreditosClientesInsert installment into historicocuotascreditos during archival
RegistroPagoCuotasCreditosClientes_OrdenPagosCashManHaProcess an installment payment (INSERT into transacciones)
RegistroCopiaContratoClientesFinalStore signed contract filename and set proceso_finalizado='si'
RegistrarSolicitudesCreditosClientesHistorico_CanceladosManually archive a cancelled credit to historicocreditos
EnvioHistoricoSolicitudesCreditosDelete credit record, triggering automatic archival via trigger
EliminarSolicitudesCrediticiasCanceladas_ClientesHard-delete a denied/cancelled credit record
ConsultaListadoGeneralCreditosAprobados_EnCursoList all approved or in-progress credits
ConsultaGeneralSolicitudesCreditosDenegadasClientesList denied credit applications
ConsultaGeneralListadoCreditosAprobados_EnCurso(Alias) List active approved credits
ConsultaListadoGeneralCuotasClientesMorososList overdue installments sorted by days overdue descending
ConsultaEspecificaSolicitudesReestructuracionCreditosClientesList restructured credits assigned to a specific employee
ConsultaGeneralReestructuracionCreditosClientesList all credits in restructuring state without installments generated
ConsultarListadoCreditosClientesCanceladosList fully repaid (cancelled) credits
ConsultaGestionadorCuotasMensualesContratos_CreditosAprobadosFetch approved/cancelled credits for installment generation
ConsultaSolicitudesCreditosAprobadasCredits approved but not yet with installments generated
ConsultaIdUnicoCreditos_ProductosClientesReturn credit ID and product info for a specific client
ConsultarAvanceCreditosClientes_InterfazInicioClientesReturn payment progress data for the client dashboard
ProcedurePurpose
ConsultaTransacciones_PagosCreditosClientesFetch payment records for a specific user and installment
ConsultarTransaccionesProcesadasClientes_GeneralList all credit payment transactions ordered by date
ConsultarTransaccionesProcesadasClientes_UltimasTransaccionesLast 200 transactions across all clients
ConsultarTransaccionesProcesadasClientes_PortalInicioClientesLast 51 transactions for a specific client’s dashboard
ConsultarMisTransaccionesProcesadasClientes_EspecificaAll transactions for a specific client
ConsultaDetalleCompletoTransacciones_PagoCuotasCreditosEmpleadosLast 200 transactions processed by a specific employee
ContadorTransaccionesProcesadas_EmpleadosAtencionClientesTransaction count per employee
ConsultaTotalIngresosTransaccionesCreditos_EmpleadosAtencionTotal amount collected by a specific employee
ProcedurePurpose
RegistroNuevasCuentasAhorroClientesCashmanhaOpen a new savings account (INSERT into cuentas)
RegistroDepositoCuentasAhorrosClientesCashManHaRecord a deposit in transaccionescuentasclientes with type Entrada
RegistroRetiroCuentasAhorrosClientesCashManHaRecord a withdrawal with type Salida
AnularDepositosTransaccionesCuentasClientesVoid a deposit by setting estadotransaccion='AnularDeposito'
AnularRetirosTransaccionesCuentasClientesVoid a withdrawal by setting estadotransaccion='AnularRetiro'
BloquearCuentasAhorroRegistradasClientesSet estadocuenta='bloqueada'
CerrarCuentasAhorroRegistradasClientesSet estadocuenta='cerrada'
ActivarCuentasAhorroRegistradasClientesSet estadocuenta='activa'
ConsultaListadoCuentasAhorrosRegistradasList all accounts ordered by client name
ConsultaEspecificaDatosCuentasAhorroClientesCashmanhaFetch account details for a specific user
ConsultaGeneralTransaccionesCuentasClientesProcesadasList all processed account transactions
ConsultaGeneralTransaccionesCuentasClientesAnuladasList all voided account transactions
ProcedurePurpose
RegistrarTransferenciasEnviadasClientesExecute a transfer (INSERT into transferencias, triggers handle balance updates)
RegistroCodigoSeguridadTransferenciasCuentasClientesStore a new OTP security code before a transfer is authorised
Verificar_ValidacionCodigoSeguridadTransferenciasValidate that a submitted OTP is still Valido
ConsultarExistenciaCuentaAhorros_SistemaTransferenciasClientesConfirm that a destination account number exists
ConsultaDatosClientes_TransferenciasCuentasAhorrosFetch destination account and owner info by account number
ProcedurePurpose
RegistroNuevosMensajesUsuarios_MensajeriaCashManHaSend a new internal message (INSERT into mensajeria)
ConsultaMensajesBandejaEntradaUsuariosCashmanHaFetch inbox messages for a given recipient (visible only) ordered by date
ConsultarDetallesMensajesBandejaEntradaUsuariosCashmanHaFetch a single message by ID
OcultarMensajesRecibidos_MensajeriaInternaUsuariosCashManHaArchive a message by setting ocultarmensaje='si'
ConsultarNotificacionesRecibidasUsuariosFetch all unread notifications for a user
ConsultaNotificacionesRecortada_BarraHerramientasPlataformaFetch last 25 notifications for the toolbar bell icon
OcultarNotificacionesRecibidasUsuariosDismiss a notification by setting ocultarnotificacion='si'
ProcedurePurpose
RegistrarNuevosProductosCashManHaCreate a new product record
ModificarProductosRegistradosCashManHaUpdate all product fields
ActivarProductosCashManHaSet product estado='activo'
DesactivarProductosCashmanHaSet product estado='inactivo'
ExpirarProductosCashmanHaSet product estado='expirado'
ConsultarProductosCashManHARegistrados_ActivosList active products
ConsultarProductosDisponibles_NuevosCreditosList products available for new credit applications
ProcedurePurpose
RegistroReportesFallosPlataformaSubmit a bug report ticket
ActualizacionTicketsReportesFallosPlataformaUpdate ticket status, add staff comment
ConsultaCompleta_ReportesFallosPlataformaList all tickets ordered by report date
ProcedurePurpose
ReporteCompletoIniciosdeSesionesUsuariosFull login history for a specific user ordered by date
ConsultaDatosGenerales_InicioPlataformaAdministradoresDashboard summary statistics for admin home screen

Naming Convention

Procedure names follow a consistent three-part pattern that makes the operation immediately clear:
{Verb}{Domain}{Scope/Qualifier}

Examples:
  Registrar  + NuevosMensajesUsuarios + _MensajeriaCashManHa
  Consultar  + ListadoCreditosClientes + Cancelados
  Actualizar + ConfiguracionCuentas    + AdministradoresConFoto
Verbs used across the codebase:
VerbOperation
Registrar / IngresoINSERT
Consultar / ConsultaSELECT
Actualizar / Actualizacion / ModificarUPDATE
Eliminar / Envio (to history)DELETE
Bloquear / Desactivar / Cerrar / Activar / ReactivarStatus UPDATE
AnularVoid/reverse UPDATE
When navigating the 148-procedure codebase, filter by verb prefix first (grep "^CREATE PROCEDURE Registrar") to find all write procedures, then narrow by domain keyword.

Build docs developers (and LLMs) love