Documentation Index
Fetch the complete documentation index at: https://mintlify.com/daecheverri9801/core-projects/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Gerencia analytics dashboard provides comprehensive reporting tools to track sales performance, monitor project health, and make data-driven decisions. This guide covers how to effectively use each analytics component.
Accessing Analytics
Login as Manager
Authenticate with a Gerente role account.
Navigate to Dashboard
Go to Gerencia → Dashboard or directly to /gerencia/dashboard.
Apply Filters (Optional)
Configure dashboard filters:
- Date range (
desde / hasta)
- Project
- Advisor
- Property state
Dashboard Sections
1. Global Summary Cards
The top of the dashboard displays high-level KPIs:
Ventas Totales (Total Sales)
// Sum of all sales in selected period
$ventasTotales = Venta::where('tipo_operacion', 'venta')
->whereBetween('fecha_venta', [$desde, $hasta])
->sum('valor_total');
Interpretation:
- Tracks total revenue generated
- Includes property + parking prices
- Filters by date range and optional project/advisor
Use Cases:
- Compare year-over-year performance
- Track quarterly targets
- Measure campaign effectiveness
Unidades Vendidas (Units Sold)
$unidadesVendidas = Venta::where('tipo_operacion', 'venta')
->whereBetween('fecha_venta', [$desde, $hasta])
->count();
Interpretation:
- Number of completed sales (not separations)
- Indicates sales velocity
- Basis for escalation pricing triggers
Benchmark: Compare against project capacity and goals.
Inventario Disponible (Available Inventory)
$estadoDisponible = EstadoInmueble::where('nombre', 'Disponible')->first();
$inventario = Apartamento::where('id_estado_inmueble', $estadoDisponible->id)->count()
+ Local::where('id_estado_inmueble', $estadoDisponible->id)->count();
Interpretation:
- Remaining sellable units
- Excludes “Vendido”, “Separado”, “Bloqueado”
- Critical for inventory planning
Action Items:
- Low inventory → Prepare pricing increases
- High inventory → Intensify marketing
2. Sales by Project Chart
Chart Type: Horizontal Bar Chart
Data Structure:
{
labels: ['Proyecto Aurora', 'Proyecto Esmeralda', 'Proyecto Mirador'],
datasets: [
{
label: 'Valor Total',
data: [450000000, 380000000, 290000000],
backgroundColor: '#1e3a5f'
},
{
label: 'Unidades',
data: [18, 15, 12],
backgroundColor: '#3b82f6'
}
]
}
How to Read:
- Each bar represents a project
- Left axis: Revenue (COP)
- Right axis: Units sold
- Compare relative performance across portfolio
Insights:
- Identify top-performing projects
- Spot underperforming developments
- Allocate sales resources effectively
3. Goals vs. Actual (Proyección vs Real)
Chart Type: Grouped Bar Chart
Data Source:
// Metas (Goals) defined at /gerencia/metas
$metas = Meta::where('ano', $ano)
->where('mes', $mes)
->get();
// Real (Actual) from sales
$ventas = Venta::whereYear('fecha_venta', $ano)
->whereMonth('fecha_venta', $mes)
->groupBy('id_proyecto')
->get();
Comparison View:
Proyecto Aurora
┌───────────────────────────┐
│ Meta Unidades: 15 │
│ Real Unidades: 18 (120%) │
├───────────────────────────┤
│ Meta Valor: $450M │
│ Real Valor: $475M (106%) │
└───────────────────────────┘
Status: ✓ Exceeded goal
Interpretation:
- Green bars (actual > meta): Goal exceeded
- Red bars (actual < meta): Under target
- Percentage: Achievement rate
Action Items:
- Under 80%: Immediate intervention needed
- Review advisor performance
- Adjust pricing/incentives
- Intensify marketing
- Over 120%: Consider raising goals
- Accelerate pricing escalation
- Reward high performers
4. Sales Velocity Chart
Chart Type: Bar Chart
Metric: Average days from project start to unit sale
Calculation:
$inicio = Carbon::parse($proyecto->fecha_inicio);
$ventasProyecto = Venta::where('id_proyecto', $id)->get();
$dias = $ventasProyecto->map(function ($venta) use ($inicio) {
return $inicio->diffInDays(Carbon::parse($venta->fecha_venta));
});
$promedio = round($dias->avg(), 1);
Example:
Proyecto Aurora: 45.3 días
Proyecto Esmeralda: 67.8 días
Proyecto Mirador: 89.2 días
Interpretation:
- Lower = Better: Faster sales velocity
- Indicates market demand and pricing appropriateness
- Benchmark across similar projects
Insights:
- < 60 days: Strong demand, consider price increases
- 60-90 days: Normal market pace
- > 90 days: Review pricing/marketing strategy
5. Separation Effectiveness Table
View: Tabular data with advisor performance
Columns:
- Advisor name
- Total separations created
- Separations converted (to ventas)
- Separations expired
- Conversion rate
Sample Data:
┌─────────────────┬────────┬──────────┬──────────┬──────────┐
│ Asesor │ Total │ Ejecutadas │ Caducadas │ Tasa Conv │
├─────────────────┼────────┼──────────┼──────────┼──────────┤
│ María Rodríguez │ 28 │ 24 │ 4 │ 85.7% │
│ Carlos Mendoza │ 22 │ 18 │ 4 │ 81.8% │
│ Ana Gutiérrez │ 19 │ 13 │ 6 │ 68.4% │
└─────────────────┴────────┴──────────┴──────────┴──────────┘
Benchmarks:
- > 80%: Excellent conversion
- 60-80%: Good performance
- < 60%: Needs improvement
Coaching Opportunities:
- High “Caducadas” → Follow-up training
- Low “Total” → Pipeline generation focus
- High conversion → Share best practices
6. Detailed Inventory Table
View: Expandable project-level inventory with filters
Structure:
Proyecto Aurora [▼]
┌─────────┬───────────┬────────────┬────────────┬──────────────┐
│ Unidad │ Precio Base │ Precio Actual │ Estado │ Asesor │
├─────────┼───────────┼────────────┼────────────┼──────────────┤
│ Apto101 │ $150M │ $158M │ Vendido │ M. Rodríguez │
│ Apto102 │ $150M │ $158M │ Disponible │ — │
│ Apto201 │ $165M │ $172M │ Separado │ C. Mendoza │
└─────────┴───────────┴────────────┴────────────┴──────────────┘
Filters:
'estado_inmueble' => integer | null
Use to view:
- All available units (for sales team)
- All sold units (for accounting)
- Specific project inventory
Export: Available as Excel download
View: Table showing sales by advisor and project
Columns:
- Project
- Advisor
- Ventas (completed sales)
- Separaciones (active reservations)
- Conversion rate
Use Cases:
- Commission calculations
- Performance reviews
- Territory assignment
- Training needs identification
8. Inventory Status Doughnut Charts
Chart Type: Doughnut (one per project)
Segments:
{
labels: ['Disponible', 'Vendido', 'Separado', 'Bloqueado', 'Congelado'],
datasets: [{
data: [35, 45, 8, 2, 0],
backgroundColor: ['#10b981', '#3b82f6', '#f59e0b', '#ef4444', '#6b7280']
}]
}
Interpretation:
- Center Number: Total units in project
- Segment Size: Proportion in each state
- Colors: Visual state identification
Health Indicators:
- Large green (Disponible): Early project or slow sales
- Large blue (Vendido): Successful project nearing sellout
- Large orange (Separado): Active pipeline, monitor conversions
- Red segments (Bloqueado): Investigate issues
9. Advisor Ranking Bar Chart
Chart Type: Horizontal Bar Chart
Metric: Total revenue generated per advisor
Query:
DB::table('ventas')
->join('empleados', 'empleados.id_empleado', '=', 'ventas.id_empleado')
->where('ventas.tipo_operacion', 'venta')
->select(
DB::raw("CONCAT(empleados.nombre, ' ', empleados.apellido) as asesor"),
DB::raw("SUM(ventas.valor_total) as total_ventas")
)
->groupBy('empleados.id_empleado', 'empleados.nombre', 'empleados.apellido')
->orderByDesc('total_ventas')
->get();
Use Cases:
- Identify top performers for rewards
- Set benchmarks for team
- Allocate leads to high performers
10. Monthly Absorption Line Chart
Chart Type: Multi-line time series
Data:
{
labels: ['2024-01', '2024-02', '2024-03', '2024-04', '2024-05'],
datasets: [
{
label: 'Proyecto Aurora',
data: [3, 5, 4, 6, 8]
},
{
label: 'Proyecto Esmeralda',
data: [2, 3, 5, 4, 6]
}
]
}
Interpretation:
- Upward trend: Accelerating sales
- Flat line: Steady absorption
- Downward trend: Slowing sales (investigate)
- Spikes: Marketing campaigns or price adjustments
Action Items:
- Compare to marketing spend
- Correlate with pricing changes
- Identify seasonal patterns
Payment Plan Consolidation (Plan Pagos CI)
Overview
Comprehensive view of all down payment schedules across sales.
Access: Scroll to “Plan de Pagos Cuota Inicial” section
Table Structure
┌──────────┬────────┬────────┬─────────┬─────────┬─────────┬─────────┐
│ Proyecto │ Inmueble │ Cliente │ 2024-05 │ 2024-06 │ 2024-07 │ 2024-08 │
├──────────┼────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ Aurora │ Apto101 │ Martínez │ 5M (S) │ 4.2M │ 4.2M │ 70M (R) │
│ Aurora │ Apto205 │ Gómez │ 5M (S) │ — │ 8.3M │ — │
├──────────┼────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ TOTALES │ │ │ 10M │ 4.2M │ 12.5M │ 70M │
└──────────┴────────┴────────┴─────────┴─────────┴─────────┴─────────┘
Legend:
(S) = Separación (initial deposit)
(R) = Restante (final balance)
Payment Structure Logic
// GerenciaEstadisticasService::planPagosCI
// Mes 0: Separation deposit
$mes0 = $fechaBase->format('Y-m');
$mesesRow[$mes0] = $separacion;
// Months 1..N: Installments based on frequency
$fechaPago = $fechaBase->copy()->addMonths($frecuencia);
for ($k = 1; $k <= $numPagos; $k++) {
$mes = $fechaPago->format('Y-m');
$mesesRow[$mes] = $cuotaPorPago;
$fechaPago->addMonths($frecuencia);
}
// Month N+1: Remaining balance
$mesRestante = $fechaBase->copy()->addMonths($plazo + 1)->format('Y-m');
$mesesRow[$mesRestante] = $valorRestante;
Use Cases
Cash Flow Forecasting:
- Totals row shows expected monthly income
- Plan for construction financing
- Treasury management
Client Follow-up:
- Identify upcoming payment dates
- Proactive collection management
- Payment reminder automation
Financial Reporting:
- Export to Excel for accounting
- Share with investors/stakeholders
- Audit trail
Exporting Data
Excel Export (Plan Pagos CI)
Configure Filters
Set desired date range, project, and advisor filters on dashboard.
Click Export Button
In the “Plan Pagos CI” section, click Exportar Excel.
Download File
System generates:// Route
GET /gerencia/plan-pagos-ci/export?desde=2024-01-01&hasta=2024-12-31
// Controller
return Excel::download(
new PlanPagosCIExport($encabezados, $filas, $totales),
'plan_pagos_cuota_inicial.xlsx'
);
File includes:
- All filtered sales
- Monthly payment schedule
- Totals row
- Formatted as currency
File Format: .xlsx (Excel 2007+)
Print/PDF Export
Use browser print functionality:
Optimize View
Apply desired filters and scroll to section.
Print
Ctrl+P (Windows) or Cmd+P (Mac)
Select PDF
Choose “Save as PDF” as printer destination.
Setting Sales Goals
Navigate to Goals Management
Go to /gerencia/metas from the Gerencia menu.
Click Create Goal
Select Nueva Meta button.
Configure Goal Parameters
Enter:id_proyecto: integer // Project
ano: integer // Year (e.g., 2024)
mes: integer // Month (1-12)
meta_unidades: integer // Target units
meta_valor: numeric // Target revenue
Example:{
"id_proyecto": 5,
"ano": 2024,
"mes": 6,
"meta_unidades": 15,
"meta_valor": 450000000
}
Save Goal
Submit to create the goal. It will appear in “Proyección vs Real” chart.
Editing Goals
View Goals List
At /gerencia/metas, see all defined goals.
Click Edit
Select goal to modify.
Update Values
Adjust meta_unidades or meta_valor as needed.
Save Changes
Dashboard updates automatically to compare new targets.
Login Activity Monitoring
Viewing Login Logs
Route: /gerencia/login-logs
Displays:
[
'empleado_nombre' => string,
'login_time' => timestamp,
'ip_address' => string,
'user_agent' => string,
]
Use Cases:
- Security audits
- Track advisor activity
- Identify unusual access patterns
- Compliance reporting
Best Practices
Regular Monitoring Schedule
Daily:
- Check global summary cards
- Review separation effectiveness
- Monitor new sales
Weekly:
- Analyze sales velocity
- Review advisor performance
- Check inventory levels
Monthly:
- Compare goals vs. actual
- Export payment plan for accounting
- Review and adjust sales goals
- Generate executive reports
Using Filters Effectively
Project Focus:
Use to deep-dive into single project performance.
Advisor Review:
Prepare for 1-on-1 performance meetings.
Quarter Analysis:
?desde=2024-04-01&hasta=2024-06-30
Quarterly board presentations.
Year Comparison:
// Current year
?desde=2024-01-01&hasta=2024-12-31
// Previous year
?desde=2023-01-01&hasta=2023-12-31
Compare with new browser tab/window.
Troubleshooting
Dashboard Loading Slowly
Cause: Large date range or no filters.
Fix:
- Apply project filter to reduce data
- Use shorter date ranges (quarterly vs. multi-year)
- Contact administrator to implement caching
Goals Not Appearing
Cause: No metas defined for selected period.
Fix:
- Verify goals exist at
/gerencia/metas
- Check that goal month/year matches dashboard filter
- Create new goals if missing
Cause: No data in selected period/filters.
Fix:
- Adjust filters to include data
- Check that sales exist in selected range
- Verify browser allows downloads
Technical Reference
- Service:
app/Services/GerenciaEstadisticasService.php
- Controller:
app/Http/Controllers/Gerencia/GerenciaDashboardWebController.php
- View:
resources/js/Pages/Gerencia/Dashboard/Index.vue
- Export:
app/Exports/PlanPagosCIExport.php
- Routes:
routes/web.php:414-448