@extends('layouts.app')
@section('page-title', 'Materials & Pricing')
@push('page-css')
@endpush
@section('content')
Materials & Pricing
Manage your decking boards, timber, fixings, and pricing configuration. Click any value to edit it.
{{-- ===== BOARDS TAB ===== --}}
@forelse($manufacturers as $mfr)
@foreach($mfr->boards as $board)
Width
{{ $board->width_mm }}
Gap
{{ $board->gap_mm }}
Default Length
{{ $board->default_length_mm }}
Fixing
{{ ucfirst($board->fixing_type ?? 'screws') }}
Price/Board
{{ number_format($board->price_per_board, 2) }}
@if($board->price_per_linear_meter > 0)
Price/Lin. Metre
{{ number_format($board->price_per_linear_meter, 2) }}
@endif
Wastage
{{ $board->wastage_recommended ?? 0 }}
@if($board->warranty_years)
Warranty
{{ $board->warranty_years }}
@endif
{{-- Colours --}}
Colours
@foreach($board->colours as $colour)
{{ $colour->name }}
@endforeach
{{-- Prices --}}
@php $hasVariants = $board->prices->whereNotNull('board_colour_id')->isNotEmpty(); @endphp
Pricing
@if($hasVariants)
| Colour | Width | Length | Price | |
@foreach($board->prices->sortBy(['board_colour_id', 'width_mm', 'length_mm']) as $price)
| {{ $price->colour?->name ?? 'Default' }} |
{{ $price->width_mm ?? $board->width_mm }}mm |
{{ number_format($price->length_mm) }}mm |
{{ number_format($price->price, 2) }} |
|
@endforeach
@else
| Length | Price | |
@foreach($board->prices->sortBy('length_mm') as $price)
| {{ number_format($price->length_mm) }}mm |
{{ number_format($price->price, 2) }} |
|
@endforeach
@endif
@endforeach
@empty
No manufacturers configured for this tenant.
@endforelse
{{-- ===== TIMBER & LABOUR TAB ===== --}}
@php
$pricingCategories = ['framingTimber' => 'Framing Timber', 'labour' => 'Labour Rates', 'balustrade' => 'Balustrade Pricing'];
@endphp
@foreach($pricingCategories as $catKey => $catLabel)
@if(isset($pricingConfigs[$catKey]))
@foreach($pricingConfigs[$catKey] as $config)
@include('tools.partials.config-row', ['config' => $config])
@endforeach
@endif
@endforeach
{{-- ===== FIXINGS & DELIVERY TAB ===== --}}
@php
$fixingsCategories = ['fixings' => 'Fixings & Accessories', 'delivery' => 'Delivery Charges', 'compositeDecking' => 'Composite Decking', 'otherComposite' => 'Other Composite'];
@endphp
@foreach($fixingsCategories as $catKey => $catLabel)
@if(isset($pricingConfigs[$catKey]))
@foreach($pricingConfigs[$catKey] as $config)
@include('tools.partials.config-row', ['config' => $config])
@endforeach
@endif
@endforeach
@endsection
@push('page-scripts')
@endpush