Overview
The sales processing module is the core of the BMS POS system, providing a fast and intuitive interface for cashiers to process customer transactions. The system supports barcode scanning, manual product search, multiple payment methods, tax calculations, and receipt generation.Quick transactions
Fast barcode scanning with real-time inventory validation
Multiple payment methods
Support for Cash, Card, ETF/Digital, and custom payment types
Tax management
Automatic tax calculations with support for primary and secondary taxes
Receipt printing
Optional receipt preview and thermal printer support
POS workflow
Login and start session
Cashiers log in using their Employee ID and PIN. The system tracks session time and automatically logs out after inactivity.
Add products to cart
Products can be added by:
- Scanning barcodes with a barcode scanner
- Searching by product name, barcode, brand, or category
- Clicking product cards in the grid view
Adjust quantities
Click the quantity input in the cart to edit quantities using the on-screen keyboard. The system prevents quantities exceeding available stock.
Apply discounts (manager only)
Managers can apply percentage-based discounts (10%, 20%, 30%, 40%, 50%) with optional reasons. If configured, cashiers can request manager approval by entering a manager PIN.
Select payment method
Choose from available payment methods configured in System Settings:
- Cash
- Card
- ETF/Digital
- Custom payment methods
Enter amount paid
Enter the amount received from the customer. The system automatically calculates change and validates that payment is sufficient.
Complete sale
Click “Complete Payment” to process the transaction. The system:
- Validates payment amount
- Deducts inventory quantities
- Generates a unique transaction ID
- Records the sale with timestamp and employee details
- Updates low stock alerts
Product display
Products are displayed in a responsive grid with:- Product image - from UPC database or custom URL
- Product name - with overflow truncation
- Price - formatted in local currency
- Stock status - color-coded indicators:
- Red “OUT OF STOCK” banner - cannot be added to cart
- Orange “LOW STOCK” banner - quantity below minimum stock level
- Blue quantity badge - items currently in cart
Barcode scanning
The system automatically detects barcode scanner input by monitoring rapid keystrokes. When a barcode is scanned:- Product is instantly looked up by barcode (via
GET /api/products/barcode/{barcode}) - If found, product is added to cart with quantity 1
- If not found, an alert is displayed
- Stock validation prevents adding out-of-stock items
Cart management
Add to cart
When adding products, the system:- Checks if product already exists in cart
- Validates available stock quantity
- Increments quantity if already in cart
- Shows alert if attempting to exceed stock
Modify quantities
Click the quantity input field to open the numeric keyboard. The system:- Validates new quantity against stock
- Updates line total automatically
- Removes item if quantity is set to 0
Remove items
Click the × button on any cart item to remove it completely.Clear cart
The “Clear Cart” button removes all items and resets discounts.Tax calculations
The system supports flexible tax configurations:Primary tax
Secondary tax
If enabled, a second tax is calculated on the subtotal:Tax exemptions
If tax exemptions are enabled, managers can toggle “Tax Exempt Sale” to process tax-free transactions.Final total calculation
Payment processing
Payment methods
Available payment methods are configured in System Settings. Common options:- Cash - Default method, calculates change
- Card - Credit/debit card payments
- ETF/Digital - Electronic fund transfers, digital wallets
- Custom - Add your own payment methods
Manager approval for discounts
If “Require Manager Approval for Discounts” is enabled in System Settings:- Cashier selects discount percentage
- System prompts for manager PIN
- Manager PIN is validated via
electronAPI.validateManagerPin() - If valid, discount is applied and reason is requested
- If invalid, discount is rejected
Payment validation
Before processing:- Cart must not be empty
- Amount paid must be ≥ final total
- Payment method must be selected
Sale recording
Successful sales are stored with:POST /api/sales
Receipt generation
Receipt preview
If “Show Receipt Preview” is enabled in System Settings, the receipt preview modal displays:- Business name and details
- Transaction ID (last 8 digits displayed)
- Sale date and time
- Cashier name
- Itemized list with quantities and prices
- Subtotal, taxes, discounts
- Total amount, payment method
- Amount paid and change
Printing options
Print receipt
Sends receipt to configured thermal printer via Electron IPC
Skip printing
Completes transaction without printing
Back to payment
Returns to payment screen to make adjustments
Receipt format
Receipts are generated as plain text using thegenerateTextReceipt() utility, which formats:
- Business logo (if configured)
- Center-aligned headers
- Fixed-width columns for item details
- Right-aligned currency values
- Separator lines between sections
Session management
The POS screen includes automatic session tracking:- Session timeout - Configured in System Settings (default: 15 minutes)
- Business action extension - Completing a sale extends session by 5 minutes
- Session indicator - Top-right corner shows remaining time
- Auto-logout - Users are logged out after inactivity period
API endpoints
The sales processing module interacts with these API endpoints:| Endpoint | Method | Purpose |
|---|---|---|
/api/products | GET | Load active products |
/api/products/barcode/{barcode} | GET | Search product by barcode |
/api/tax-settings | GET | Load tax configuration |
/api/system-settings | GET | Load system settings |
/api/sales | POST | Create new sale transaction |
Stock validation
Real-time inventory checks
The system performs inventory validation at multiple points: When adding to cart:- Backend validates stock availability
- Prevents race conditions with database-level checks
- Returns error if insufficient stock
- Stock quantities are decremented atomically
- Product
LastUpdatedtimestamp is updated - Low stock alerts are triggered automatically
Out of stock handling
Products with zero stock:- Display red “OUT OF STOCK” banner
- Are grayed out in product grid
- Cannot be clicked or added to cart
- Do not respond to barcode scans
Low stock warnings
Products at or below minimum stock level:- Display orange “LOW STOCK” banner
- Remain available for purchase
- Are highlighted for reordering attention
- Can still be added to cart normally
UI features
Search and filtering
The search bar filters products by:- Product name
- Barcode
- Brand
- Category
Touch screen support
The interface is optimized for touch screens:- Large, tappable product cards
- On-screen keyboard for text/numeric input
- Touch-friendly buttons and controls
- Responsive grid layout adapts to screen size
Keyboard shortcuts
While no explicit shortcuts are defined, the system:- Detects rapid barcode scanner input automatically
- Ignores keyboard input when modal keyboard is open
- Prevents interference with regular typing
Error handling
Common scenarios
Product not found:Recovery actions
If a sale fails:- Error message is displayed to user
- Cart remains intact (not cleared)
- User can adjust and retry
- Inventory quantities are not affected
- No partial transactions are created
Best practices
For cashiers
For cashiers
- Scan barcodes efficiently - the system detects rapid scanner input automatically
- Verify quantities before completing payment
- Double-check payment amount and change calculation
- Use Clear Cart to start fresh if customer changes their mind
- Watch for low stock warnings to alert managers
For managers
For managers
- Configure available payment methods in System Settings
- Set up tax rates before first use
- Enable manager approval for discounts to control markdown abuse
- Configure receipt preview to reduce paper waste
- Monitor session timeout settings for security vs convenience balance
For system administrators
For system administrators
- Test barcode scanner configuration before deployment
- Configure thermal printer settings in Electron main process
- Set up UPC database for automatic product information
- Enable receipt preview for training purposes
- Configure appropriate session timeouts based on store traffic
Troubleshooting
Barcode scanner not working
Barcode scanner not working
Symptoms: Scanning barcodes doesn’t add products to cartSolutions:
- Verify scanner is configured to send Enter key after barcode
- Check USB connection is secure
- Test scanner in a text editor to verify output
- Ensure minimum barcode length is 5 characters
- Check scanner is in USB-HID keyboard mode
Products not loading
Products not loading
Symptoms: “Loading products…” message persistsSolutions:
- Check API connection:
GET /api/products - Verify database is running and accessible
- Check browser console for JavaScript errors
- Ensure at least one product exists with
isActive = true
Receipt printer not responding
Receipt printer not responding
Symptoms: “Print Receipt” completes but nothing printsSolutions:
- Verify printer is powered on and connected
- Check USB/network connection to printer
- Test printer with OS print dialog
- Verify Electron IPC handler is properly configured
- Check printer paper is loaded and not jammed
Tax calculations incorrect
Tax calculations incorrect
Symptoms: Tax amounts don’t match expected valuesSolutions:
- Verify tax rates in System Settings → Tax Settings
- Check if secondary tax is enabled when not needed
- Ensure tax exemption toggle is in correct state
- Review calculation: tax = (subtotal × rate) / 100
- Check for floating-point rounding issues
Related documentation
- Inventory management - Managing product catalog
- System settings - Configuring POS behavior
- Tax settings - Tax calculation rules
- Employee management - User accounts and permissions