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.

The Transactions module is the auditing backbone of CashMan H.A. Every financial event — whether a loan installment payment or a savings account deposit, withdrawal, or transfer — generates an immutable transaction record. These records are viewable by all roles, scoped to their permission level, and serve as the basis for printable payment receipts (generated via FPDF). Customer Service staff also have access to personal performance metrics derived from their processed transactions.

Transaction Record Types

CashMan H.A. maintains two distinct transaction tables to separate credit activity from savings activity.

1. Credit Transactions (transacciones)

Records every installment payment order processed against an active credit. Key fields include:
  • idtransaccion — unique transaction identifier
  • referencia — payment order reference number
  • monto — amount paid
  • fecha — transaction timestamp
  • empleadogestion — the Customer Service employee who processed the payment
  • ocultartransacciones_clientes — administrator flag to hide old entries from client view

2. Savings Account Transactions (transaccionescuentasclientes)

Records every deposit, withdrawal, transfer, or void processed against a savings account. Key fields include:
  • idtransaccion — unique transaction identifier
  • referencia — operation reference number
  • monto — transaction amount
  • saldo_nuevo — account balance after this transaction
  • tipo — transaction type (deposit, withdrawal, transfer)
  • estado — transaction state (active or voided)
  • empleadogestion — processing employee
  • fecha — transaction timestamp

Credit Payment Flow (Orden de Pago)

Customer Service staff process loan installment payments through the dedicated payment order interface.
1

Fetch Installment Details

Staff queries the specific installment to be paid using ConsultarCuotas_OrdenPagoClientes(), which calls SP ConsultaEspecificaCuotasClientes_OrdenPagoSistemaPagos. This returns the installment’s due date, outstanding amount, accrued late fees (morainteres), and current status.
$objGestiones->setIdCuotasClientes($_POST['idcuota']);
$resultado = $objGestiones->ConsultarCuotas_OrdenPagoClientes();
2

Process Payment

The payment is submitted via PagosCuotasClientes_TransaccionesCreditos(), which calls SP RegistroPagoCuotasCreditosClientes_OrdenPagosCashManHa. The stored procedure records the transaction and updates the credit’s remaining balance (saldo_actual).
$objGestiones->setMontoTransaccionCreditosClientes($_POST['montopago']);
$objGestiones->setReferenciaTransaccionCreditosClientes($referencia);
$resultado = $objGestiones->PagosCuotasClientes_TransaccionesCreditos();
3

Automatic Installment Status Update

Immediately after the payment record is inserted, the database trigger CambioEstadoCuotas_OrdenPagoCreditosClientes fires and sets estadocuota = 'cancelado' on the corresponding installment row. No additional application-layer call is required.

Transaction Query Access by Role

Each role can query transaction history within their authorised scope.
RoleAccess LevelKey Methods
Administrator (Role 1)Full transaction list; per-client breakdownComplete query methods for all transacciones and transaccionescuentasclientes records
Presidency (Role 2)Last 200 transactions system-wideSystem-wide summary queries
Management (Role 3)Last 200 transactions system-wideSystem-wide summary queries
Customer Service (Role 4)Own processed transactions + performance metricsConsultarListadoUltimasTrasacciones_PortalAtencionClientes() and metric methods below
Client (Role 5)Their own transactions onlyFiltered queries by idusuarios

Customer Service Performance Metrics

The platform tracks three key performance indicators per Customer Service employee, accessible from their dashboard.
MethodStored ProcedureMetric
Consulta_ContadorTransaccionesProcesadas_AtencionClientes()ContadorTransaccionesProcesadas_EmpleadosAtencionClientesTotal number of transactions processed by the employee
Consulta_ContadorSolicitudesCreditosProcesadas_AtencionClientes()ConsultaSolicitudesCreditosProcesadas_EmpleadosAtencionClientesTotal credit requests handled by the employee
Consulta_TotalIngresosTransaccionesCreditosProcesadas_AtencionClientes()ConsultaTotalIngresosTransaccionesCreditos_EmpleadosAtencionTotal monetary value of all credit payments processed by the employee

Historic Archiving

When a credit is completed or cancelled, all associated payment records are archived:
  • The credit itself moves to the historicocreditos table via EnvioSolicitudesCreditosAlHistoricoCreditos() — SP EnvioHistoricoSolicitudesCreditos
  • Installment records move to historicocuotascreditos via RegistroAsignacionCuotasMensualesClientesHistorico()
Historic receipts and state-of-account reports remain printable from the historic credit detail view, using the same FPDF-based PDF generation pipeline as active credits.
The ocultartransacciones_clientes flag on the transacciones table allows administrators to hide specific credit transaction entries from the client-facing view. This is useful for suppressing legacy or corrected records without deleting audit data. The transaction remains fully visible to administrative and management roles.

Build docs developers (and LLMs) love