{{-- Rates grid for one room type at one property. Rows: date x occupancy. Columns: meal plan, each with a USD and an LKR price. Past dates (and the whole grid when not $editable) are rendered as text only. --}} @foreach($mealTypes as $mealType) @endforeach @foreach($mealTypes as $mealType) @endforeach @foreach($dates as $date) @php($isPast = $date < $today) @foreach($occupancies as $occupancy) @if($loop->first) @endif @foreach($mealTypes as $mealType) @foreach(['USD', 'LKR'] as $code) @php($price = $grid[$date][$occupancy->id][$mealType->id][$code] ?? null) @endforeach @endforeach @endforeach @endforeach
Date Occupancy{{ $mealType->mealType }}
USD LKR
{{ $date }}
{{ \Carbon\Carbon::parse($date)->format('D') }}
@if($open[$date]) Open @else Closed @endif @if($isPast) Past @elseif($editable)
@endif
{{ $occupancy->occupancy_name }} @if($editable && !$isPast) @else {{ $price !== null ? number_format($price, 2) : '–' }} @endif