Output Directory Structure
The system generates all outputs in theoutput/ directory:
The
output/ directory and graficos/ subdirectory are created automatically if they don’t exist (see src/reportes_graficos.py:7).Excel Report Structure
The main report fileoutput/reporte_inventario.xlsx contains multiple sheets with different views of the inventory data.
Sheet 1: Inventario_Completo
Contains the complete inventory with all analysis columns:| Column | Description | Source |
|---|---|---|
| Original Data | Product info, stock levels, sales | Input file |
porcentaje_acumulado | Cumulative percentage for ABC classification | src/analisis.py:17 |
categoria_abc | ABC category (A, B, or C) | src/analisis.py:28 |
estado_stock | Stock status (OK, RIESGO, CRITICO) | src/decisiones.py:19 |
reponer_cantidad | Recommended replenishment quantity | src/decisiones.py:27 |
Sheet 2: Productos_Criticos
Filtered view showing only products in CRITICO status (stock at or below minimum). Filter Logic (src/reportes.py:11-12):
Sheet 3: Productos_En_Riesgo
Filtered view showing only products in RIESGO status (stock slightly above minimum but approaching critical levels). Filter Logic (src/reportes.py:14-15):
Products in this sheet should be monitored closely and replenished soon to prevent reaching critical levels.
Excel Formatting
The Excel report includes automatic formatting (fromsrc/reportes.py:17-30):
Stock Status Classification
Understanding theestado_stock values (from src/decisiones.py:11-17):
CRITICO Status
Condition:stock_actual <= stock_minimo
- Stock is at or below minimum threshold
- Action Required: Immediate replenishment needed
- Risk: High risk of stockout
RIESGO Status
Condition:stock_actual <= stock_minimo * 1.2
- Stock is within 20% above minimum threshold
- Action Required: Plan replenishment soon
- Risk: Moderate risk, approaching critical level
OK Status
Condition:stock_actual > stock_minimo * 1.2
- Stock is sufficiently above minimum threshold
- Action Required: Monitor normally
- Risk: Low risk, adequate inventory
ABC Classification
Products are classified using the Pareto principle (fromsrc/analisis.py:4-31):
Category A
Criteria: Top products contributing to 70% of total sales- Priority: High
- Management: Tight inventory control, frequent review
- Typical Percentage: ~20% of products, 70% of sales value
Category B
Criteria: Products contributing to next 20% of sales (70-90% cumulative)- Priority: Medium
- Management: Moderate control, periodic review
- Typical Percentage: ~30% of products, 20% of sales value
Category C
Criteria: Remaining products (90-100% cumulative sales)- Priority: Low
- Management: Basic control, occasional review
- Typical Percentage: ~50% of products, 10% of sales value
Replenishment Recommendations
Thereponer_cantidad column suggests how much to reorder (from src/decisiones.py:22-27):
- Only calculated for CRITICO and RIESGO products
- Recommendation = Monthly Sales - Current Stock
- Minimum recommendation is 0 (never negative)
- OK products show 0 (no replenishment needed)
The recommendation aims to bring stock up to at least one month’s worth of sales.
Generated Charts
Chart 1: estado_inventario.png
Type: Bar Chart Location:output/graficos/estado_inventario.png
Generated by: src/reportes_graficos.py:9-19
- Number of products in each status (OK, RIESGO, CRITICO)
- Quick visual assessment of overall inventory health
Chart 2: clasificacion_abc.png
Type: Pie Chart Location:output/graficos/clasificacion_abc.png
Generated by: src/reportes_graficos.py:21-30
- Distribution of products across A, B, and C categories
- Percentage breakdown of each category
The pie chart shows product count distribution, not sales value distribution.
Interpreting Results
High number of CRITICO products
High number of CRITICO products
Indication: Inventory management issues or supply chain problemsActions:
- Review the Productos_Criticos sheet
- Prioritize replenishment for Category A products first
- Check
reponer_cantidadfor recommended order quantities - Investigate if minimum stock levels are set too low
Many products in RIESGO status
Many products in RIESGO status
Indication: Products approaching critical levelsActions:
- Review the Productos_En_Riesgo sheet
- Plan replenishment orders proactively
- Monitor Category A and B products more closely
- Adjust reorder points if this happens frequently
Large percentage in Category C
Large percentage in Category C
Indication: Normal ABC distributionActions:
- Consider reducing inventory of slow-moving C items
- Evaluate if Category C products are still needed
- Focus management attention on A and B categories
Negative or zero replenishment recommendations
Negative or zero replenishment recommendations
Indication: Stock levels are adequateActions:
- No immediate action needed
- Continue normal monitoring
- Product should show “OK” status
Using the Reports for Decision Making
Report Frequency Recommendations
| Inventory Type | Recommended Frequency |
|---|---|
| High-velocity products | Daily |
| Standard inventory | Weekly |
| Slow-moving inventory | Monthly |
| Seasonal products | As needed before season |
Next Steps
Configuration
Learn how to configure file paths and system settings
Email Setup
Set up automatic email delivery of reports