@include('pdf._header') {{-- Deck Dimensions Summary --}}

Project Summary

Dimensions: {{ $inputs['length'] ?? 'N/A' }}m × {{ $inputs['width'] ?? 'N/A' }}m Area: {{ number_format(($inputs['length'] ?? 0) * ($inputs['width'] ?? 0), 2) }} m²
Board: {{ $inputs['boardType'] ?? $inputs['board_type'] ?? 'N/A' }} Direction: {{ $inputs['direction'] ?? 'lengthwise' }}
{{-- Decking Boards --}} @if(!empty($results['boards']))

Decking Boards

@php $boardTotal = 0; @endphp @foreach($results['boards'] as $board) @php $lineTotal = ($board['quantity'] ?? 0) * ($board['priceEach'] ?? $board['price_each'] ?? 0); $boardTotal += $lineTotal; @endphp @endforeach
Description Quantity Unit Price Total
{{ $board['name'] ?? $board['description'] ?? 'Decking Board' }} ({{ $board['length'] ?? '' }}mm) {{ $board['quantity'] ?? 0 }} £{{ number_format($board['priceEach'] ?? $board['price_each'] ?? 0, 2) }} £{{ number_format($lineTotal, 2) }}
Board Total £{{ number_format($boardTotal, 2) }}
@endif {{-- Timber / Substructure --}} @if(!empty($results['timber']))

Substructure & Timber

@php $timberTotal = 0; @endphp @foreach($results['timber'] as $item) @php $timberTotal += $item['cost'] ?? $item['total'] ?? 0; @endphp @endforeach
Item Quantity Length Cost
{{ $item['name'] ?? $item['description'] ?? 'Timber' }} {{ $item['quantity'] ?? $item['qty'] ?? 0 }} {{ $item['length'] ?? '' }}mm £{{ number_format($item['cost'] ?? $item['total'] ?? 0, 2) }}
Timber Total £{{ number_format($timberTotal, 2) }}
@endif {{-- Fixings --}} @if(!empty($results['fixings']))

Fixings & Accessories

@php $fixingsTotal = 0; @endphp @foreach($results['fixings'] as $fixing) @php $fixingsTotal += $fixing['cost'] ?? $fixing['total'] ?? 0; @endphp @endforeach
Item Quantity Cost
{{ $fixing['name'] ?? $fixing['description'] ?? 'Fixing' }} {{ $fixing['quantity'] ?? $fixing['qty'] ?? 0 }} £{{ number_format($fixing['cost'] ?? $fixing['total'] ?? 0, 2) }}
Fixings Total £{{ number_format($fixingsTotal, 2) }}
@endif {{-- Labour --}} @if(!empty($results['labour']))

Labour

Description Cost
Installation Labour £{{ number_format($results['labour']['total'] ?? $results['labour']['cost'] ?? 0, 2) }}
@endif {{-- Grand Total --}} @if(!empty($results['totalCost']) || !empty($results['total_cost']))

Total Estimate: £{{ number_format($results['totalCost'] ?? $results['total_cost'] ?? 0, 2) }}

@if(!empty($results['totalCostIncVat']) || !empty($results['total_cost_inc_vat']))

Inc. VAT: £{{ number_format($results['totalCostIncVat'] ?? $results['total_cost_inc_vat'] ?? 0, 2) }}

@endif
@endif @include('pdf._footer')