Overview
The Inventory module provides comprehensive stock management across multiple warehouses. It automatically tracks all inventory movements, maintains stock levels, and provides detailed audit trails for compliance and analysis.Multi-Warehouse
Manage stock across multiple locations
Auto Adjustments
Automatic updates from sales and purchases
Audit Trail
Complete movement history
Core Components
Inventory Stock
Tracks the current quantity of each product in each warehouse.app/Models/Inventory/InventoryStock.php
warehouse_id- The warehouse locationproduct_id- The product being trackedquantity- Current stock levelmin_stock- Minimum threshold for low stock alerts
Inventory Movements
Records every change in inventory with complete audit information.app/Models/Inventory/InventoryMovement.php
Movement Types
- Input
- Output
- Adjustment
- Transfer
Input movements increase stock levels. Common scenarios:Accounting Entry:
- Purchases from suppliers
- Production of manufactured goods
- Returns from customers
- Initial stock setup
Inventory Service
TheInventoryMovementService handles all stock operations with automatic accounting integration.
Register Movement
app/Services/Inventory/InventoryMovementService.php
Stock Validation
Before creating output movements, the system validates stock availability:Warehouses
The system supports multiple warehouse locations:app/Models/Inventory/Warehouse.php
Common Warehouse Setups
Single Location
Single Location
Simple businesses with one warehouse:
- Main Warehouse - All products stored here
Multi-Location
Multi-Location
Businesses with multiple sales locations:
- Main Warehouse - Primary storage
- Store 1 - Retail location
- Store 2 - Retail location
Distribution
Distribution
Distribution businesses:
- Central - Main distribution center
- North - Regional warehouse
- South - Regional warehouse
- Transit - In-transit goods
Stock Queries
Current Stock Levels
Low Stock Alerts
Stock Value
Movement History
Reporting
Stock Report
View current stock levels across all warehouses:Movement Report
Track all inventory activity:Excel Export
app/Http/Controllers/Inventory/InventoryStockController.php
Integration Points
Sales Module
When a sale is created, inventory is automatically reduced:app/Services/Sales/SalesServices/SaleService.php
Accounting Module
Inventory movements generate journal entries for proper cost tracking:- Inputs increase inventory asset and create payable/expense
- Outputs recognize cost of goods sold
- Adjustments account for variance
Best Practices
Use Polymorphic References
Use Polymorphic References
Always link movements to their source document:This provides complete audit trails and enables reversals.
Set Minimum Stock Levels
Set Minimum Stock Levels
Configure
min_stock for each product-warehouse combination:Regular Physical Counts
Regular Physical Counts
Perform periodic physical counts and use adjustments to reconcile:
Monitor Negative Stock
Monitor Negative Stock
Prevent negative stock situations:
Related Documentation
Sales Module
How sales integrate with inventory
Products Module
Product configuration
Accounting
Financial integration
Inventory Service API
Service implementation details