Overview
The Inventory module helps you manage spare parts, components, and products for both repairs and direct sales. Track stock levels, receive low-stock alerts, record movements, and enable items for sale in your billing system.What You Can Do
- Register inventory items with unique internal codes
- Track current stock quantities
- Set low-stock thresholds for automatic alerts
- Adjust stock with addition/removal movements
- Enable items for direct sale with pricing
- View movement history for audit trails
- Receive notifications when stock runs low
Accessing Inventory
Navigate to Inventario (Inventory) from the main menu. The page displays:- Low-stock alerts (if any items are below threshold)
- Unread low-stock notifications
- Search functionality
- Full inventory table with current stock levels
- Recent movement history
Creating Inventory Items
Enter Product Name
Fill in the Nombre (Name) field:
- Required field
- Maximum 180 characters
- Use descriptive names for easy identification
Set Internal Code
Assign a unique Identificador interno (Internal Code):
- Required field
- Maximum 120 characters
- Must be unique within your company
- Use consistent format for easy organization
- “CAP-20UF-450V”
- “TERM-UNIV-001”
- “REF-001”
Set Initial Quantity
Enter the starting Cantidad inicial (Initial Quantity):
- Required field
- Integer value (whole numbers only)
- Minimum: 0
- Maximum: 1,000,000
- Default: 0
Set Low-Stock Threshold (Optional)
Define the Umbral de escasez (Low-Stock Threshold):
- Optional field (recommended)
- Integer value
- Minimum: 0
- Maximum: 1,000,000
- Default: 5
- Highlights the item in red
- Shows a “Bajo” (Low) badge
- Sends notifications to admins and authorized workers
Enable for Sale (Optional)
Check Habilitar venta if this item can be sold directly to customers:
- Enables the item in billing/POS module
- Requires sale price to be set
- Stock automatically decrements when sold
Items not enabled for sale can still be used for internal repairs and stock tracking.
Set Sale Price (If Enabled)
If sale is enabled, enter Precio de venta (Sale Price):
- Required when “Habilitar venta” is checked
- Decimal value supported (e.g., 125.50)
- Minimum: 0
- Maximum: 99,999,999.99
- Uses company’s currency
Inventory Item Fields
| Field | Required | Type | Max Value | Validation |
|---|---|---|---|---|
| name | Yes | Text | 180 chars | Cannot be empty |
| internal_code | Yes | Text | 120 chars | Unique per company |
| quantity | Yes | Integer | 1,000,000 | Min 0 |
| low_stock_threshold | No | Integer | 1,000,000 | Min 0, default 5 |
| is_sale_enabled | No | Boolean | - | Default false |
| sale_price | Conditional | Decimal | 99,999,999.99 | Required if sale enabled |
Viewing Inventory
The inventory table displays:Producto (Product)
- Product name: Main identifier
- Low-stock threshold: Minimum stock level before alert
Identificador (Internal Code)
Unique code badge for quick reference and barcode scanning.Stock
- Current quantity: Displayed prominently
- Low stock indicator: Red text and “Bajo” badge when at or below threshold
Venta (Sale)
- “Venta habilitada”: Green badge if item can be sold
- Price: Sale price if enabled
- “Solo refacción”: Blue badge if not for sale (repair parts only)
Acciones (Actions)
- Ajustar stock: Opens modal to add or remove units
- Eliminar: Permanently deletes the item (with confirmation)
Adjusting Stock Levels
Open Adjustment Modal
Click Ajustar stock on the item you want to modify. The adjustment form appears.
Select Movement Type
Choose the Movimiento (Movement Type):
- Agregar unidades (Addition): Receiving new stock
- Retirar unidades (Removal): Using or removing stock
Enter Quantity
Specify the Cantidad (Quantity) to add or remove:
- Required field
- Integer only (whole numbers)
- Minimum: 1
- Maximum: 1,000,000
Add Notes (Optional)
Enter a Nota (Note) explaining the adjustment:
- Optional field
- Maximum 255 characters
- Helpful for audit trails
- “Compra proveedor ABC”
- “Usado en orden #1234”
- “Inventario físico corrección”
- “Defectuoso, descartado”
Movement History
The bottom section shows Movimientos recientes de stock (Recent Stock Movements):Movement Table Columns
- Fecha: Timestamp when movement occurred (YYYY-MM-DD HH:MM)
- Producto: Item name (or “Producto eliminado” if item was deleted)
- Tipo:
- Green “Entrada” badge for additions
- Orange “Salida” badge for removals
- Cantidad: Number of units moved
- Stock: Shows before and after quantities (e.g., “10 → 15”)
- Usuario: Name of user who performed the movement
Movement Tracking
The system automatically creates movements for:- Initial stock when item is created
- Manual adjustments (additions/removals)
- Sales through billing module (automatic removals)
Low-Stock Alerts
Alert Card
When items fall to or below their threshold, a warning card appears at the top:- Count badge: Number of items currently low
- Item list: Shows each low-stock item with code and current quantity
- Auto-notification: Admins and inventory-enabled workers receive notifications
Notification System
Low-stock notifications display:- Unread notifications: List appears in a card on the inventory page
- Message format: “[Item Name] tiene stock bajo: [Quantity] unidades restantes.”
- Automatic trigger: Sent when quantity drops to or below threshold
- Recipients: All admins and workers with
can_access_inventorypermission
Notifications are sent in real-time when stock changes trigger the low-stock condition. Mark them as read to clear from the page.
Searching Inventory
Use the search to find items quickly:Searchable Fields
- Product name: Partial match (e.g., “Capacitor”, “termo”)
- Internal code: Partial match (e.g., “CAP-”, “001”)
Search Process
View Results
The table updates to show only matching items. The count badge reflects filtered results.
Deleting Inventory Items
To delete an item:- Click the red Eliminar button on the item
- Confirm the deletion in the browser prompt
- The item is permanently removed from inventory
- Past movements remain in history for audit purposes
- Items with movement history
- Items referenced in old invoices or orders
- Items with remaining stock value
Integration with Billing
Sale-Enabled Items
When creating billing documents:- Items with
is_sale_enabled = trueappear in product dropdowns - Stock quantity displays for each product
- Out-of-stock items (quantity = 0) are disabled
- Selecting a product auto-fills:
- Description (name + code)
- Unit price (sale_price)
- Max quantity (current stock)
Automatic Stock Reduction
When an invoice or quote is created:- Product quantities automatically decrement
- A “removal” movement is created
- Movement is linked to the billing document
- If stock drops below threshold, low-stock alert triggers
Best Practices
Establish Internal Code Standards
Establish Internal Code Standards
Create a consistent coding system:
- Category prefix: CAP (capacitors), RES (resistors), BELT (belts)
- Specifications: Include key specs in code
- Sequential numbers: CAP-001, CAP-002, etc.
- Avoid special characters: Stick to letters, numbers, hyphens
CAP-20UF-450V= Capacitor, 20 microfarads, 450 voltsBELT-WM-A= Belt, Washing Machine, Type ATERM-REF-UNIV= Thermostat, Refrigerator, Universal
Set Realistic Low-Stock Thresholds
Set Realistic Low-Stock Thresholds
Consider these factors:
- Lead time: How long to reorder?
- Usage frequency: How often used in repairs?
- Critical items: Set higher thresholds for essential parts
- Seasonal demand: Adjust for peak seasons
- Common capacitors: 10 units
- Specialized parts: 3 units
- High-turnover items: 20+ units
Document Stock Adjustments
Document Stock Adjustments
Always add notes when adjusting stock:
- Purchases: Include supplier and date
- Repairs: Reference order number
- Corrections: Explain the discrepancy
- Damage/Loss: Document reason
Regular Physical Counts
Regular Physical Counts
Periodically verify physical stock:
- Schedule monthly or quarterly counts
- Compare physical count to system quantity
- Use adjustments to correct discrepancies
- Investigate significant differences
Price Strategy for Sale Items
Price Strategy for Sale Items
When setting sale prices:
- Include cost + desired markup
- Account for VAT (will be applied per company setting)
- Stay competitive with local market
- Update prices when costs change
- Consider volume discounts (manual adjustment in billing)
Troubleshooting
Cannot Access Inventory Module
Cause: User lackscan_access_inventory permission.
Solution:
- Admins: Have automatic access
- Workers: Request admin to grant inventory permission
- Admin action: Go to Worker Management, edit user, check “Permitir Inventario"
"Internal Code Already Exists” Error
Cause: Another item in your company uses this code. Solution:- Search inventory to find the existing item
- Choose a different, unique code
- Consider adding a suffix: REF-001-A, REF-001-B
Item Not Appearing in Billing Product List
Possible Causes:is_sale_enabledis false (disabled for sale)- Item belongs to different company
- Page needs refresh after creating item
- Edit item to enable sale and set price
- Refresh the billing page
- Check that item shows “Venta habilitada” badge
Cannot Remove Stock - Insufficient Quantity
Cause: Trying to remove more units than currently available. Solution:- Check current stock quantity
- Reduce removal amount to available stock or less
- If item is truly gone, remove available quantity and note the loss
Low-Stock Notifications Not Received
Possible Causes:- User doesn’t have inventory permission
- Notifications already marked as read
- Threshold not set or set to 0
- Verify
can_access_inventorypermission - Check low-stock alert card on inventory page
- Review and adjust item thresholds
Technical Reference
Controller Actions
- Index:
GET /worker/inventory- List items, movements, and alerts - Store:
POST /worker/inventory- Create new inventory item - Adjust Stock:
PATCH /worker/inventory/{item}/stock- Add or remove stock - Destroy:
DELETE /worker/inventory/{item}- Permanently delete item
Data Model
Low-Stock Detection
TheInventoryItem model includes:
LowStockInventoryNotification to authorized users.
Service Layer
Inventory operations useInventoryService for:
createItem(): Creates item with initial movementadjustStock(): Handles additions/removals with movement logginglowStockItemsForCompany(): Retrieves items below threshold
Related Features
- Billing & Invoices - Sell inventory items to customers
- Worker Management - Grant inventory permissions
- Company Settings - Configure currency and VAT for pricing