@php /** @var \App\Models\Category $record */ $priceSets = $record->getInheritedPriceTables(3); @endphp @if ($priceSets->isEmpty())
No pricing tables found for this category or its child categories (up to 3 levels).
@else @foreach ($priceSets as $set)

{{ $set['label'] }}

@foreach ($set['tables'] as $group => $rows)

Price Band {{ $group }}

@php $widths = $rows->pluck('width')->unique()->sort()->values(); $drops = $rows->pluck('drop')->unique()->sort()->values(); $matrix = []; foreach ($rows as $row) { $matrix[$row->drop][$row->width] = $row->price; } @endphp
@foreach ($widths as $width) @endforeach @foreach ($drops as $drop) @foreach ($widths as $width) @endforeach @endforeach
mm {{ $width }}
{{ $drop }} {{ $matrix[$drop][$width] ?? '-' }}
@endforeach
@endforeach @endif