@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)

{{ $mfr->name }}

{{ $mfr->boards->count() }} board{{ $mfr->boards->count() !== 1 ? 's' : '' }}
@foreach($mfr->boards as $board)
{{ $board->name }}
@if($board->is_composite) Composite @else Timber @endif @if(!$board->is_active) Inactive @endif
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 --}}
@foreach($board->colours as $colour) {{ $colour->name }} @endforeach
{{-- Prices --}} @php $hasVariants = $board->prices->whereNotNull('board_colour_id')->isNotEmpty(); @endphp @if($hasVariants) @foreach($board->prices->sortBy(['board_colour_id', 'width_mm', 'length_mm']) as $price) @endforeach @else @foreach($board->prices->sortBy('length_mm') as $price) @endforeach @endif
ColourWidthLengthPrice
{{ $price->colour?->name ?? 'Default' }} {{ $price->width_mm ?? $board->width_mm }}mm {{ number_format($price->length_mm) }}mm {{ number_format($price->price, 2) }}
LengthPrice
{{ number_format($price->length_mm) }}mm {{ number_format($price->price, 2) }}
@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]))

{{ $catLabel }}

@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]))

{{ $catLabel }}

@foreach($pricingConfigs[$catKey] as $config) @include('tools.partials.config-row', ['config' => $config]) @endforeach
@endif @endforeach
@endsection @push('page-scripts') @endpush