Overview
The Point of Sale (POS) system handles product sales, service payments, and cash register operations. It supports multiple payment methods, inventory management, customer loyalty points, and mobile scanner integration.Prerequisites
- Permission:
ventas.pos(Use POS) - Cash register must be opened with initial balance (Fondo Inicial)
- Active user account
Opening the Cash Register
// Cash register opening payload
await registrarAperturaCaja(fondoInicialCaja, {
uid: auth.currentUser?.uid,
email: auth.currentUser?.email,
nombre: auth.currentUser?.displayName
});
Processing Product Sales
// Search priority:
// 1. Exact code match → auto-add
// 2. Service folio match → add service to cart
// 3. Name search → show selector if multiple matches
// Mobile scan sync
await enviarScanPosMovil({
uid,
termino: scannedCode,
actorUid: uid,
actorEmail: auth.currentUser?.email
});
Only services in “Listo” status with a valid cost can be added to cart. Services already marked as “entregado” or “cobradoEnPOS” are filtered out.
if (existe) {
if (existe.cantidad >= producto.stock) {
alert("No hay más stock disponible");
return;
}
setCarrito(carrito.map(p =>
p.id === producto.id
? { ...p, cantidad: p.cantidad + 1 }
: p
));
}
Customer Lookup
Payment Processing
pos_aplicar_iva)const descuentoPuntos = usarPuntos && clienteData
? Math.min(clienteData.puntos || 0, subtotal)
: 0;
const subtotalConDescuento = subtotal - descuentoManual - descuentoPuntos;
const totalPagado =
Number(montoEfectivo) +
Number(montoTarjeta) +
Number(montoTransferencia);
const cambio = totalPagado - total;
Inventory Management
The POS enforces strict inventory control:Stock Validation
Stock Deduction
After successful sale:Receipt Printing
Automatically prints thermal receipt with:- Sale ID and date/time
- Cashier/employee name
- Customer name and phone
- Itemized products with quantities and prices
- Service items marked as “Entregado”
- Payment method and reference
- Subtotal, IVA, and total
- Change given (if cash)
- Loyalty points earned
src/components/print_ticket_venta.jsx
Cash Register Closure
Once the cash register is closed for the day, no more sales can be processed until the next day’s opening balance is registered.
Price Comparison
Click “Comparar” on any cart item to:- View marketplace prices (Amazon, MercadoLibre, etc.)
- Compare with your current price
- Make informed pricing decisions
src/components/modal_comparador_precios.jsx
Blocked States
POS is completely disabled when:-
No opening balance registered
- Modal appears to capture fondo inicial
- All cart and search actions blocked
-
Cash register closed
- Sales blocked until next day
- Cart cleared automatically
- Closing timestamp displayed
Best Practices
Link Customers
Always enter customer phone for loyalty tracking and service history.
Verify Stock
Check product availability before promising items to customers.
Complete Services First
Ensure services are marked “Listo” before attempting to charge in POS.
Count Change Carefully
System calculates change automatically, but always verify cash transactions.
Troubleshooting
“Caja cerrada” message on POS access?- Previous day’s register was closed
- Register new opening balance for current day
- Contact administrator if needed
- Verify product inventory levels
- Check if service boleta consumes the same product
- Update stock in Products module if incorrect
- Confirm service status is exactly “Listo”
- Verify service has a valid cost amount
- Check that service hasn’t been marked as paid already
- Ensure both devices are logged in with same user
- Check internet connectivity
- Verify desktop POS is open and active
Related Workflows
- Creating Service Tickets - Register new repair services
- Tracking Inventory - Managing product stock
- Cash Register Operations - Opening and closing procedures
- Managing Clients - Customer records and loyalty points
