Core Components
Products
Product catalog with variants and attributes
Warehouses
Multiple warehouse locations
Stock Control
Real-time stock levels and movements
Products (Productos)
Products are the items you sell or purchase.Product Structure
Located atCore/Model/Producto.php:
Key Features
Product Variants
Products support multiple variants (sizes, colors, etc.):Product Images
Tax Calculation
Stock Control Modes
No Stock Control
- Stock levels are always zero
- No stock updates from operations
- Useful for services or non-inventory items
- Automatically sets
ventasinstock = true
Sales Without Stock
- Selling products even when stock is zero or negative
- Useful for made-to-order items
- Backorder management
Product Status
Blocked Products
- Cannot be purchased
- Cannot be sold
- Not synchronized to online stores
- Useful for discontinued items
Warehouses (Almacenes)
Warehouses represent physical storage locations.Warehouse Model
Located atCore/Model/Almacen.php:
Default Warehouse
- Used when no warehouse is specified
- Cannot be deleted
- Set in system settings
Multi-Company Support
Each warehouse belongs to a company:- Separate stock per company
- Independent warehouse management
- Cross-company transfers possible
Stock (Stock)
Stock records track product quantities in each warehouse.Stock Model
Located atCore/Model/Stock.php:
Stock Availability
cantidad: Physical stock in warehousereservada: Reserved for confirmed ordersdisponible: Available for new orders (cantidad - reservada)pterecibir: Expected from suppliers
Stock Transfers
Total Stock Calculation
Product Stock Updates
When stock changes, product totals are updated:Stock Movements
Stock is automatically updated by:Sales Documents
- Delivery Notes: Reduce stock when delivered
- Invoices: Can reduce stock depending on configuration
- Orders: Can reserve stock
Purchase Documents
- Supplier Delivery Notes: Increase stock on receipt
- Purchase Invoices: Can increase stock
Document Line Control
Stock Tracking
Stock Levels
Minimum Stock (stockmin):
- Alert threshold for reordering
- Used in stock reports
- Per warehouse
stockmax):
- Target stock level
- Helps prevent overstocking
- Per warehouse
Warehouse Locations
- Aisle, rack, shelf codes
- Bin numbers
- Custom location identifiers
Product Families and Manufacturers
Organize products hierarchically:Families
- Categorization
- Group reporting
- Filtering and search
- Shared attributes
Manufacturers
Inventory Validation
Product Validation
Deletion Protection
Reference Management
Unique References
Product references must be unique across the system:Auto-Generation
Product Updates
Automatic Timestamp
actualizado for sync tracking.
Variant Synchronization
Best Practices
Stock Control Strategy
Stock Control Strategy
Decide whether to control stock at delivery note or invoice level. Most businesses use delivery notes to match physical movements.
Multiple Warehouses
Multiple Warehouses
Use separate warehouses for different locations, even if small. This provides better tracking and reporting.
Stock Levels
Stock Levels
Set minimum and maximum stock levels for automatic reorder reports. Review and adjust regularly based on sales velocity.
Product References
Product References
Use consistent, meaningful reference codes. Consider including category or manufacturer codes in the reference.
Regular Counts
Regular Counts
Perform regular physical inventory counts and reconcile with system stock. Use stock adjustment documents.
Integration Points
With Invoicing
- Sales documents can update stock
- Purchase documents can increase stock
- Stock validation on document save
With Accounting
- Products link to purchase/sales accounts
- Stock movements can generate accounting entries
- Inventory valuation reports
With Pricing
- Base price without tax
- Tax-inclusive price calculation
- Variant-specific pricing
- Customer-specific prices via tariffs
Related Models
Core/Model/Producto.php- ProductsCore/Model/Variante.php- Product variantsCore/Model/Stock.php- Stock recordsCore/Model/Almacen.php- WarehousesCore/Model/Familia.php- Product familiesCore/Model/Fabricante.php- ManufacturersCore/Model/ProductoImagen.php- Product imagesCore/Model/Atributo.php- Product attributes
Next Steps
Invoicing
Learn how documents update inventory
Reports
Generate inventory reports and analytics

