The Cajas module manages the physical (or virtual) cash drawers used by every shift in Kantuta POS. A Caja is a named register entity with a specialization type. Operators open a SesionCaja at the start of their shift with an opening balance, record any ad-hoc cash movements during the shift, and close the session with a physical count at the end. The backend then calculates the theoretical balance and difference automatically.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Eleazarguitar18/kantuta_pos_front/llms.txt
Use this file to discover all available pages before exploring further.
Caja List
View all configured registers, their specialization, and current session status at
/cajas.Caja Control
Open or close a session, record movements, and download the shift PDF report at
/cajas/control/:id.Caja Types
Each caja is configured with one of threeespecialidad values that determine which transaction types are allowed on its sessions:
| Especialidad | Allowed Transactions |
|---|---|
SOLO_VENTAS | Product sales only. Cannot process agent banking transactions. |
SOLO_AGENTES | Banking agent operations only. Cannot process regular product sales. |
MIXTA | Both sales and agent transactions are permitted. |
TypeScript Interfaces
Caja & SesionCaja
Request DTOs
Open-Shift Workflow
Navigate to the Caja list
Go to
/cajas. The list shows all registered cajas with their current session status. Click the Control button on the row you want to open.Enter the opening balance
On the CajasControl page (
/cajas/control/:id), find the “Abrir Nueva Sesión” panel. Enter the physical cash float in the Monto Inicial field (in Bolivianos).Open the session
Click Abrir Caja. The frontend calls
CajasService.abrirSesion() which posts to POST /cajas/abrir. On success, CajaContext globally updates sesionActiva — this unlocks the POS terminal and the Recargas module.Record movements during the shift
Use the Movimiento de Efectivo panel to register any off-sale cash events (e.g., paying a delivery driver, receiving a petty-cash advance). Select
INGRESO or EGRESO, enter the amount and a mandatory motivo, and click Registrar.Close the session (arqueo)
At end of shift, count the physical cash in the drawer and enter the amount in Dinero Físico en Caja. Click Confirmar Cierre de Caja. The backend:
- Computes
monto_final_teorico=monto_inicial+ all INGRESOs − all EGRESOs. - Records
monto_final_realas submitted. - Calculates
diferencia=monto_final_real − monto_final_teorico. - Sets
estado_sesiontoCERRADA.
CajasControl Page
The/cajas/control/:id page provides a two-panel layout:
- Status & Session Panel
- Cash Movement Panel
Shows the current session state with a green banner when open or a grey “Caja Cerrada” notice when idle.Open session fields:
- Session ID
fecha_apertura(formatted ines-BOlocale)monto_inicial- Link to download the session PDF
monto_final_real— pre-filled by the live balance fetched fromGET /cajas/sesion/:id/balance- Confirm button triggers
cerrarCaja(montoFinalReal, sesionActiva.id)
The CajasControl page also subscribes to the Socket.IO
dataChanged event for the caja entity, so the session status panel refreshes automatically if another user performs an action on the same register.Internal Movement Types
| Type | Effect on balance | Example use case |
|---|---|---|
INGRESO | Increases monto_final_teorico | Petty cash received, change fund replenishment. |
EGRESO | Decreases monto_final_teorico | Purchase payment, supplier invoice settlement. |
pagar_con_caja: true automatically create an EGRESO — no manual entry is required.
Role Restrictions
Administrador-only actions
Administrador-only actions
| Action | Route |
|---|---|
| Create caja | /cajas/registrar |
| Edit caja name/type | /cajas/editar/:id |
| Delete caja | Button on /cajas list |
REST Endpoints
URL Routes
| Page | Path |
|---|---|
| Caja list | /cajas |
| Caja control & session management | /cajas/control/:id |
| Register new caja (Admin) | /cajas/registrar |
| Edit caja (Admin) | /cajas/editar/:id |