Overview
The sales module allows you to process customer transactions, apply discounts and taxes, track payment methods, and view sales history in real-time.Accessing Sales
Creating a Sale
Step 1: Customer Information
Enter customer name
In the “Cliente” field, type the customer’s name. The system can track frequent customers for future reference.
Select vendor (optional)
Click the “Vendedor” dropdown to assign a sales associate:
- Click the selector to open the vendor dropdown
- Use the search box to find a specific vendor
- Click a vendor name to select them
- The selected vendor appears in the field
- System calls
salesService.getVendedores()to load available staff
Step 2: Add Products
Search for products
In the “Buscar producto” field:
- Type the product name or scan a barcode
- System calls
salesService.searchProducts()for real-time results - Select a product from the search results
Step 3: Configure Discounts and Taxes
Apply discount percentage
In the “Descuento %” field:
- Enter a custom discount percentage (0-100)
- Or click preset buttons for common discounts:
- 5%
- 10%
- 15%
- 20%
- Discount amount appears in red in the totals section
Step 4: Select Payment Method
Choose payment type
Click one of the payment method buttons:
- Efectivo (Cash) - Default, green button
- Tarjeta (Card) - Blue button
- Transfer (Bank transfer) - Purple button
- Cheque (Check) - Orange button
- Digital (Digital wallet) - Indigo button
Step 5: Add Notes (Optional)
Step 6: Review and Complete
Check totals
Review the calculation summary:
- Subtotal: Sum of all products before adjustments
- Descuento: Discount amount (if applicable)
- IVA: Tax amount (if applicable)
- Total: Final amount to collect
Viewing Sales History
The left panel shows recent sales transactions:Filter Sales
Filter by time period
Click one of the filter buttons:
- Todos: All sales
- Hoy: Today’s sales only
- Semana: Last 7 days
- Mes: Last 30 days
View Sale Details
Exporting Sales Data
Updating Sale Status
For administrators only:Best Practices
Always verify the total amount with the customer before completing a sale.
- Verify product availability: Check stock before adding items
- Double-check quantities: Ensure correct quantities are entered
- Apply discounts accurately: Verify discount percentages with manager
- Select correct payment method: Important for accounting and reconciliation
- Add helpful notes: Record special requests or customer information
- Review before completing: Always check the total before clicking Cobrar
- Handle returns properly: Contact administrator for refunds
Common Scenarios
Frequent Customer
Bulk Purchase with Discount
Mixed Payment Methods
For now, select the primary payment method. For split payments, contact your administrator.Troubleshooting
Product Not Found
- Verify the product name spelling
- Check if product exists in inventory
- Try searching by barcode
- Contact inventory manager if product should exist
Sale Won’t Complete
- Ensure all required fields are filled
- Check that customer name is entered
- Verify products are added to the sale
- Confirm payment method is selected
- Check your internet connection
Incorrect Total
- Verify product quantities are correct
- Check discount percentage is accurate
- Ensure IVA rate is correct (usually 0% or 16%)
- Recalculate manually if needed
Technical Reference
Sales operations use thesalesService.js service:
- Search products:
salesService.searchProducts(searchTerm, limit) - Get vendors:
salesService.getVendedores(includeInactive) - Create sale:
salesService.createSale(saleData) - Get sales:
salesService.getSales(filters) - Get sale details:
salesService.getSale(saleId) - Update status:
salesService.updateSaleStatus(saleId, status) - Export sales:
salesService.exportSales(filters)
https://cemac-api.vercel.app.