Overview
Products (also called “rubros” in the system) are the core inventory items tracked by the PAE system. Each product has a current stock level, unit of measurement, and optional category classification.Required Role: Director or Madre ProcesadoraSupervisors have read-only access and cannot create or modify products.
Product Structure
Each product contains the following information:| Field | Type | Required | Description |
|---|---|---|---|
| Product Name | Text | ✓ | Unique name for the item (e.g., “Arroz”, “Aceite de girasol”) |
| Stock | Decimal | Auto | Current inventory quantity (updated automatically) |
| Unit of Measure | Select | ✓ | kg, lt, or unidades |
| Category | Select | Optional | Classification (Lacteos, Proteinas, etc.) |
| Description | Text | Optional | Additional notes about the product |
Creating a New Product
Click 'Nuevo Rubro'
Click the + Nuevo Rubro button in the top-right corner. The product creation form will appear.
Fill in product details
Enter the required information:
- Nombre del rubro: Enter a unique, descriptive name
- Unidad de medida: Select from:
kg- Kilogramos (for dry goods, produce)lt- Litros (for liquids)unidades- Units (for countable items)
- Categoría (optional): Choose the appropriate category:
- Lacteos (dairy)
- Proteinas (proteins)
- Carbohidratos (carbohydrates)
- Legumbres (legumes)
- Vegetales (vegetables)
- Frutas (fruits)
- Aceites y grasas (oils and fats)
- Condimentos (condiments)
- Otros (other)
- Descripción (optional): Add any relevant notes
Example from Code (Products.jsx:71-98)
Updating a Product
Locate the product
Find the product in the inventory table. You can scroll or use browser search (Ctrl+F).
Modify the information
Update any fields as needed. The stock value cannot be edited manually - it updates automatically through entry guides and daily operations.
Deleting a Product
Required Role: Director onlyMadre Procesadora users cannot delete products.
Delete Protection (Products.jsx:121-142)
Products that are referenced in entry guides, daily operations, or portion configurations cannot be deleted:Stock Level Indicators
The system automatically displays color-coded stock level badges:| Badge | Stock Level | Meaning |
|---|---|---|
| BAJO | < 10 units | Critical - reorder immediately |
| MEDIO | 10-49 units | Monitor - may need restocking soon |
| OK | ≥ 50 units | Sufficient stock |
Stock Badge Logic (Products.jsx:155-159)
How Stock is Updated
Stock levels are automatically updated by the system - you cannot edit stock directly:Stock Increases
- When a Director approves an entry guide (guía de entrada)
- Quantities from approved guides are added to stock
- See: Entry Approval Workflow
Stock Decreases
- When a daily operation is registered (registro diario)
- The system uses FIFO to consume batches and deduct from stock
- See: FIFO System
Automatic Stock Trigger (supabase_schema.sql:293-322)
- Stock cannot go negative
- Updates are atomic (locked during transaction)
- Errors are raised if insufficient stock
Product Categories
The system includes 9 predefined categories (supabase_schema.sql:55-65):Best Practices
Use consistent naming
Use consistent naming
Use clear, standardized names:
- ✓ “Arroz blanco”
- ✓ “Aceite de girasol”
- ✗ “arroz” (too generic)
- ✗ “ACEITE!!!” (inconsistent formatting)
Choose the right unit of measure
Choose the right unit of measure
Select the unit that matches how the product is received and used:
- Rice, flour →
kg - Oil, milk →
lt - Eggs, individual fruits →
unidades
Don't delete products with history
Don't delete products with history
If a product is no longer used, leave it in the system with zero stock. Deleting removes valuable historical data.
Configure portions after creating products
Configure portions after creating products
After adding a new product, configure its portion yield in Configuración > Porciones so it can be used in daily operations.See: Portion Management
Related Resources
Portion Management
Configure how many servings each product yields
Entry Approval Workflow
How inventory is added through approved entry guides
FIFO System
How batch tracking ensures oldest items are used first
Daily Operations
How stock is consumed during daily meal service