@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
| mm |
@foreach ($widths as $width)
{{ $width }}
|
@endforeach
@foreach ($drops as $drop)
|
{{ $drop }}
|
@foreach ($widths as $width)
{{ $matrix[$drop][$width] ?? '-' }}
|
@endforeach
@endforeach
@endforeach
@endforeach
@endif