{{-- Header --}}
{{ $scenario->title }}
{{ $typeLabel }}
{{ $report->address ?? 'Plot' }} — {{ $scenario->created_at->format('d M Y H:i') }}
{{-- Base Parameters --}}
@if($scenario->base_params)
Base Parameters
@foreach($scenario->base_params as $key => $val)
{{ ucwords(str_replace('_', ' ', $key)) }}:
{{ is_numeric($val) ? number_format($val) : $val }}
@endforeach
@endif
{{-- Recommendation --}}
@if($rec)
{{ ($rec['should_amalgamate'] ?? $rec['best_scenario'] ?? $rec['best_type'] ?? $rec['optimal_tdr_pct'] ?? $rec['optimal_extra_far'] ?? false) ? '✓ Recommendation' : '✗ Analysis Result' }}
@if(isset($rec['best_scenario']))
Best: {{ $rec['best_scenario'] }}
@endif
@if(isset($rec['best_type']))
Best Type: {{ ucfirst($rec['best_type']) }}
@endif
@if(isset($rec['optimal_tdr_pct']))
Optimal TDR: {{ $rec['optimal_tdr_pct'] }}% — Net Gain: ₹{{ number_format($rec['net_gain_inr'] ?? 0) }}
@endif
@if(isset($rec['optimal_extra_far']))
Optimal Extra FSI: {{ $rec['optimal_extra_far'] }} — Net Gain: ₹{{ number_format($rec['net_gain_inr'] ?? 0) }}
@endif
{{ $rec['reason'] ?? '' }}
@endif
{{-- Scenario Data Table --}}
@if($scenario->scenarios && count($scenario->scenarios))
{{ $scenario->type === 'optimizer' ? 'Configuration Results' : 'Scenarios' }}
@if($scenario->type === 'what_if')
| Scenario |
Buildable (sqm) |
Floors |
Score |
@foreach($scenario->scenarios as $sc)
| {{ $sc['label'] ?? 'Scenario' }} |
{{ number_format($sc['result']['max_buildable_area_sqm'] ?? 0) }} |
{{ $sc['result']['max_floors'] ?? '—' }} |
{{ $sc['result']['feasibility_score'] ?? '—' }} |
@endforeach
@elseif($scenario->type === 'optimizer')
@foreach($scenario->scenarios as $i => $cfg)
@if($i === 0)
Best
@endif
{{ $cfg['project_type'] ?? '' }}
Buildable: {{ number_format($cfg['max_buildable_sqm'] ?? 0) }} sqm
Floors: {{ $cfg['max_floors'] ?? '—' }}
Profit: ₹{{ number_format($cfg['profit_inr'] ?? 0) }}
ROI: {{ $cfg['roi_pct'] ?? 0 }}%
@if(!empty($cfg['unit_mix']))
@foreach($cfg['unit_mix'] as $u)
{{ $u['type'] }}
{{ $u['count'] }} units
@endforeach
@endif
@endforeach
@elseif(in_array($scenario->type, ['tdr', 'premium_fsi']))
| {{ $scenario->type === 'tdr' ? 'TDR %' : 'Extra FSI' }} |
New FAR |
Extra Area |
Cost |
Net Gain |
Viable |
@foreach($scenario->scenarios as $tier)
| {{ $scenario->type === 'tdr' ? ($tier['tdr_pct'] ?? '').'%' : ($tier['extra_far'] ?? '') }} |
{{ $tier['new_far'] ?? '—' }} |
{{ number_format($tier['additional_area_sqm'] ?? 0) }} sqm |
₹{{ number_format($tier[$scenario->type === 'tdr' ? 'tdr_cost_inr' : 'premium_cost_inr'] ?? 0) }} |
₹{{ number_format($tier['net_gain_inr'] ?? 0) }} |
{{ ($tier['is_viable'] ?? false) ? '✅' : '❌' }} |
@endforeach
@elseif($scenario->type === 'amalgamation')
@foreach($scenario->scenarios as $plot)
{{ $plot['label'] ?? 'Plot' }}
{{ number_format($plot['area_sqm'] ?? 0) }} sqm — Road: {{ $plot['road_width'] ?? '—' }}m
{{ number_format($plot['result']['max_buildable_area_sqm'] ?? 0) }} sqm
buildable
@endforeach
@endif
@endif
{{-- Comparison Table --}}
@if($scenario->comparison && count($scenario->comparison))
Comparison Summary
@if($scenario->type === 'amalgamation')
@php
$comp = $scenario->comparison;
@endphp
{{ number_format($comp['synergy_sqm'] ?? 0) }}
Synergy (sqm)
{{ $comp['synergy_pct'] ?? 0 }}%
Synergy %
₹{{ number_format($comp['profit_diff_inr'] ?? 0) }}
Profit Diff
{{ $comp['combined_floors'] ?? '—' }}
Combined Floors
@else
@php
// Determine how many scenario columns exist from the first comparison row
$firstRow = $scenario->comparison[0] ?? [];
$scenarioColCount = 0;
while (isset($firstRow['scenario_' . $scenarioColCount])) { $scenarioColCount++; }
@endphp
| Metric |
Base |
@for($s = 0; $s < $scenarioColCount; $s++)
Scenario {{ $s + 1 }} |
@endfor
@foreach($scenario->comparison as $row)
| {{ ucwords(str_replace('_', ' ', $row['metric'] ?? '')) }} |
{{ is_numeric($row['base'] ?? null) ? number_format($row['base']) : ($row['base'] ?? '—') }} |
@for($j = 0; isset($row['scenario_' . $j]); $j++)
{{ is_numeric($row['scenario_'.$j]) ? number_format($row['scenario_'.$j]) : $row['scenario_'.$j] }} |
@endfor
@endforeach
@endif
@endif
{{-- Actions --}}