Interface Layout
The POS interface uses a split-screen design optimized for fast checkout:Product Catalog (Left)
Searchable grid of available products with click-to-add functionality
Shopping Cart (Right)
Real-time cart summary with quantity controls, pricing breakdown, and payment options
Product Catalog
The left panel displays your product inventory in an easy-to-scan grid format.Search and Filter
- Product names
- SKU codes
- Real-time filtering as you type
- Todas las categorías
- Audio
- Electrónica
- Periféricos
- Accesorios
Product Cards
Each product displays as a clickable card showing:Card Components:
- Icon/Emoji - Visual product identifier
- Product Name - Full product title
- Price - Sale price in bold
- Stock Level - Current availability
Available Products in Catalog
Product Grid Examples
Product Grid Examples
In-Stock Products (click to add):
- 🎧 Audífonos Bluetooth Pro - $89.99 (Stock: 42)
- 🔌 Cable USB-C 2m - $12.50 (Stock: 4)
- ⌨️ Teclado Mecánico RGB - $149.00 (Stock: 78)
- 🖱️ Mouse Inalámbrico - $45.00 (Stock: 63)
- 🔋 Hub USB 4 Puertos - $24.99 (Stock: 115)
- 🎮 Control Gamepad - $35.00 (Stock: 29)
- 💡 Lámpara LED - $28.00 (Stock: 51)
- 🖥️ Monitor 27” 144Hz - $399.00 - Sin stock
- Displayed with 50% opacity
- Cursor shows “not-allowed”
- Cannot be added to cart
Add to Cart Implementation
Products are added via JavaScript click handlers (nueva-venta.js:37):- If product already in cart → increment quantity
- If new product → add with quantity of 1
- Automatically updates cart display
Shopping Cart Panel
The right panel shows the current transaction details.Cart Header
Customer Information
Customer information is optional for transactions. You can:
- Enter customer name manually
- Search existing customer database
- Leave blank for anonymous sales
Cart Items Display
When empty, the cart shows:- Product emoji and name
- Quantity controls (− and + buttons)
- Line total (price × quantity)
Quantity Controls
Implemented in nueva-venta.js:43:Increase Quantity [+]
Adds one unit to the cart. Updates line total and overall pricing automatically.
Decrease Quantity [−]
Removes one unit. If quantity reaches zero, the item is removed from the cart entirely.
Price Calculation
The cart summary shows a detailed pricing breakdown:Subtotal
Discount
Tax Calculation (IVA)
Tax Calculation Example:
- Subtotal: $100.00
- IVA (16%): $16.00
- Total: $116.00
Total Amount
Payment Processing
Payment Method Selection
Available Payment Methods
Available Payment Methods
- 💵 Efectivo - Cash payment
- 💳 Tarjeta de Crédito - Credit card
- 💳 Tarjeta de Débito - Debit card
- 📱 Transferencia / QR - Bank transfer or QR code payment
Charge Button
- Shows the exact amount to charge
- Updates dynamically with cart total
- Processes the transaction when clicked
- Full width, prominent design for easy access
Current Behavior:
- Validates cart is not empty
- Displays confirmation message
- Clears cart after successful sale
- Resets display to empty state
Clear Cart Button
- Canceling a transaction
- Starting a new sale
- Correcting mistakes
Real-Time Cart Updates
The cart rendering system (nueva-venta.js:11) ensures the display stays synchronized:- Checks if cart is empty
- Generates HTML for each cart item
- Calculates subtotal from all items
- Updates all pricing displays
- Called after every cart modification
Transaction Workflow
Typical POS transaction flow:- Search/Browse products in left panel
- Click products to add to cart
- Adjust quantities using +/− buttons
- Enter customer name (optional)
- Select payment method
- Review total amount
- Click Cobrar to complete sale
- Cart clears automatically for next customer
Stock Validation
The system prevents selling out-of-stock items:- Products with zero stock are visually disabled
- Card opacity reduced to 50%
- Cursor shows “not-allowed” icon
- Click events are not attached
- Stock levels display in red: “Sin stock”
Stock Tracking: After a sale is completed, the system should decrement product quantities in inventory (Firebase integration pending).
Cart Data Structure
The cart is maintained as a JavaScript array of product objects:Quick Access
From the POS page header:- 🔔 Notifications - System alerts
- ❓ Help - Support resources
- Cerrar Sesión - Logout securely
Navigation to POS
Multiple entry points throughout StockPro:- Dashboard: ”+ Nueva Venta” button in header
- Sidebar: “Nueva Venta” under Ventas section
- Sales History: ”+ Nueva Venta” button