Site Visit / Valuation Report
@if($siteVisits->count() > 0)
@foreach($siteVisits as $idx => $visit) @php $percentages = $visit->percentage_details ?? []; $accessPercent = ''; $marketabilityPercent = ''; $locationPercent = ''; $extraItems = []; if (is_array($percentages)) { foreach ($percentages as $item) { $rawName = trim($item['name'] ?? ''); $nameLower = strtolower($rawName); $valStr = isset($item['value']) && $item['value'] !== '' ? $item['value'] . '%' : ''; if ($accessPercent === '' && str_contains($nameLower, 'access')) { $accessPercent = $valStr; } elseif ($marketabilityPercent === '' && (str_contains($nameLower, 'marketab') || str_contains($nameLower, 'market'))) { $marketabilityPercent = $valStr; } elseif ($locationPercent === '' && str_contains($nameLower, 'location')) { $locationPercent = $valStr; } else { if ($rawName !== '' || $valStr !== '') { $extraItems[] = ($rawName ?: 'Item') . '-' . ($valStr ?: '0%'); } } } } @endphp @endforeach
# Name of Line GETCO Circle GETCO Division District Village Taluka Sr. No. Survey No. Guideline Rate Access Marketablit Location Extra Market Rate / Sq.Mtr
{{ $siteVisits->firstItem() + $idx }} {{ $visit->line_name ?? '-' }} {{ $visit->getco_circle ?? '-' }} {{ $visit->getco_division ?? '-' }} {{ $visit->district ?? '-' }} {{ $visit->village ?? '-' }} {{ $visit->taluka ?? '-' }} {{ $visit->sr_no ?? '-' }} {{ $visit->survey_number ?? '-' }} {{ $visit->guideline_rate ?? '-' }} {{ $accessPercent ?: '-' }} {{ $marketabilityPercent ?: '-' }} {{ $locationPercent ?: '-' }} @if(!empty($extraItems)) @foreach($extraItems as $eIdx => $extra)
{{ $eIdx + 1 }}) {{ $extra }}
@endforeach @else - @endif
{{ $visit->market_rate_per_sqm ?? '-' }}
{{ $siteVisits->links() }}
@else
No site visits found for the selected filter criteria.
@endif