Overview
The POS system allows you to:- Register sales with automatic inventory deduction
- Link sales to customers for tracking
- Calculate profit margins using FIFO cost basis
- Process transactions with custom or suggested pricing
- View immediate sale confirmation with cost and profit details
The POS feature requires
admin or gestor role permissions to access.Sale Registration Workflow
Select product
Choose the product being sold from the dropdown. The system automatically populates the suggested price, but you can override it.
Enter quantity
Specify the quantity being sold. The system validates that sufficient stock is available.
Link customer (optional)
Use the stakeholder search to link the sale to a specific customer for tracking purposes.
How It Works
The POS system integrates with the inventory movement API to register each sale as an EXIT movement:- Validates stock availability - Ensures sufficient quantity exists
- Applies FIFO costing - Deducts from oldest batches first
- Calculates COGS - Sums the unit costs from affected batches
- Computes profit -
(unit_price - average_cost) × quantity - Updates batches - Reduces
quantity_availablefor each batch used
FIFO Cost Calculation
The system uses First-In-First-Out logic to determine the cost of goods sold:- Product has 3 batches: Batch A (10 units @ 6), Batch C (20 units @ $7)
- Sale: 20 units @ $10 each
- FIFO deduction: 10 from Batch A + 10 from Batch B
- COGS: (10 × 6) = $110
- Revenue: 20 × 200
- Profit: 110 = $90
Sale Confirmation
After a successful transaction, the POS displays:Transaction details
- Movement ID
- Product name and SKU
- Quantity sold
- Unit price
- Customer (if linked)
Financial summary
- Total revenue
- Cost of goods sold (COGS)
- Profit amount
- Profit margin percentage
Integration with Inventory
Each POS sale creates an EXIT movement that:- Appears in movement history
- Updates product stock levels
- Affects batch quantities
- Triggers audit logs
- Impacts inventory valuation reports
notes: "POS Sale" in the movement history.
User Interface
The POS interface provides:- Product selector - Dropdown with product name and SKU
- Quantity input - Numeric input with validation
- Price field - Pre-filled with suggested price, editable
- Customer search - Optional stakeholder lookup
- Submit button - Processes the sale
- Confirmation panel - Shows sale details and profit calculation
Error Handling
The POS system validates:Insufficient stock
Insufficient stock
If the requested quantity exceeds available inventory, the sale is rejected with an error message indicating the maximum available quantity.
Invalid product
Invalid product
If no product is selected or the product ID is invalid, the system prevents submission.
Invalid price or quantity
Invalid price or quantity
Zero or negative values are rejected. Quantity must be a positive integer, and price must be a positive number.
Missing batches
Missing batches
If a product has no available batches (all depleted), the sale cannot proceed even if the product exists.
Best Practices
Link customers
Associate sales with customers to enable purchase history tracking and customer analytics.
Use suggested pricing
Keep the suggested price field updated in product management to streamline POS transactions.
Monitor stock levels
Use the dashboard low-stock alerts to prevent failed sales due to depleted inventory.
Review profit margins
Regularly check the profit calculations to ensure pricing strategies are effective.
Related Features
Stock Movements
View complete movement history including POS sales
Movement API
Technical details of the sale registration endpoint
Customer Management
Manage customer records for sale tracking
Inventory Reports
Analyze sales performance and profitability