Overview
Cash register operations (Corte de Caja) ensure accurate financial tracking by requiring opening balances, tracking all transactions throughout the day, and reconciling cash, card, and transfer payments at closing.Prerequisites
- Permission:
ventas.pos(Use POS) - Access to POS system
- Physical cash register key (if applicable)
Daily Cash Register Flow
Opening the Cash Register
await registrarAperturaCaja(fondoInicialCaja, {
uid: auth.currentUser?.uid,
email: auth.currentUser?.email,
nombre: auth.currentUser?.displayName
});
{
fechaKey: "2026-03-06", // YYYY-MM-DD format
fondoInicialCaja: 500.00, // Opening balance
cajero: {
uid: "user-123",
email: "[email protected]",
nombre: "Juan Pérez"
},
aperturaEn: Timestamp, // Opening timestamp
cerrado: false // Not closed yet
}
During the Day
Sales Are Tracked Automatically
Every POS sale is recorded in theventas collection:
Payment Method Tracking
The system categorizes payments:- Efectivo: Cash payments
- Tarjeta: Card payments (requires reference number)
- Transferencia: Bank transfers
- Mixed: Combination of methods
src/js/services/corte_caja_firestore.js:26-75
Cash Withdrawals & Expenses
Two types of cash outflows are tracked: 1. Retiros (Withdrawals during closing)salidasCaja during closing.
Closing the Cash Register
- Efectivo: Cash received
- Tarjeta: Card payments
- Transferencia: Transfers
denominaciones: [
{ valor: 1000, cantidad: 5 }, // 5 × $1000 = $5000
{ valor: 500, cantidad: 3 }, // 3 × $500 = $1500
{ valor: 200, cantidad: 10 }, // 10 × $200 = $2000
{ valor: 100, cantidad: 8 }, // 8 × $100 = $800
{ valor: 50, cantidad: 4 }, // 4 × $50 = $200
// ... coins
]
const efectivoDenominaciones = denominaciones.reduce(
(acc, d) => acc + (d.valor * d.cantidad),
0
);
retiros: [
{
tipo: "retiro",
monto: 5000.00,
motivo: "Depósito bancario",
usuario: "Juan Pérez"
},
{
tipo: "retiro",
monto: 1000.00,
motivo: "Fondo para cambio mañana",
usuario: "Juan Pérez"
}
]
const cajaFinalEsperada =
fondoInicialCaja + // Opening balance
resumen.efectivo - // Cash sales
totalRetiros; // Withdrawals
const diferencia = efectivoContado - resumen.efectivo;
await cerrarCajaHoy(ventasDia, {
fondoInicialCaja,
efectivoContado,
denominaciones,
retiros,
egresos,
notasCorte,
cajero: {
uid: auth.currentUser?.uid,
email: auth.currentUser?.email,
nombre: auth.currentUser?.displayName
}
});
{
fechaKey: "2026-03-06",
cerrado: true,
cerradoEn: Timestamp,
cajero: {...},
resumen: {
subtotal: 15240.00,
iva: 2438.40,
total: 17678.40,
tickets: 23,
efectivo: 9500.00,
tarjeta: 6178.40,
transferencia: 2000.00,
unidades: 47
},
fondoInicialCaja: 500.00,
cajaFinalEsperada: 4500.00,
conteoEfectivo: {
esperado: 9500.00,
contado: 9480.00,
diferencia: -20.00
},
denominaciones: [...],
retiros: [...],
totalRetiros: 5500.00,
notasCorte: "...",
ventasIds: ["venta-1", "venta-2", ...]
}
After Closing
POS Becomes Blocked
Once closed for the day:- All sales operations disabled
- Cart is cleared
- Search field disabled
- Display shows closing timestamp
Generate Closing Report
The system can generate PDF reports (seesrc/js/services/pdf_corte_caja.js) with:
- Opening/closing balances
- Sales summary by payment method
- Cash reconciliation
- Withdrawal details
- Denominations breakdown
- Cashier information
Next Day Automatic Reset
At midnight or on first POS access of new day:- Previous day’s
fechaKeyno longer matches - System requests new opening balance
- New corte de caja record created
- Sales operations resume
Automatic Closure of Old Registers
The system includes auto-close functionality:src/js/services/corte_caja_firestore.js:238-296
Viewing Historical Registers
- All historical closings
- Revenue trends
- Payment method breakdowns
- Cashier performance
- Cash variances over time
Best Practices
Accurate Opening Count
Always count opening balance carefully. Errors propagate throughout the day.
Close Daily
Never leave registers open overnight. Close at end of each business day.
Two-Person Count
Have two employees verify cash counts for amounts over $10,000.
Document Variances
Use notasCorte to explain any cash differences for audit trail.
Troubleshooting
Can’t access POS - “Captura el fondo inicial”?- Opening balance not registered for today
- Enter the cash currently in register
- If second shift, use expected amount from previous closure
- Someone closed it early by mistake
- Contact administrator to reopen
- May require database update to set
cerrado: false
- Recount physical cash
- Verify all sales were properly recorded in POS
- Check for unrecorded withdrawals or expenses
- Review transaction history for errors
- Document findings in notasCorte
- Should auto-reset based on fechaKey
- Verify system date/time is correct
- Clear browser cache and reload
- Check if corte exists for today’s date in database
- System closed it overnight automatically
- Edit the corte record manually in Firestore
- Add denominaciones and efectivoContado
- Or note it was not physically reconciled
Multi-Cashier Environments
If multiple cashiers use the same register:
- Opening balance is shared
- Each cashier’s sales are tracked separately by user
- Closing should be done by last cashier of the day
- Consider shift reports if needed between cashier changes
Related Workflows
- Processing Sales - Using POS during open register
- Permissions & Roles - Understanding the
ventas.pospermission
