@php $primaryClients = $project->clients->filter(fn($c) => $c->pivot->toggle == 0); if ($primaryClients->isEmpty()) { $primaryClients = collect([$project->client]); } $secondaryClients = $project->clients->filter(fn($c) => $c->pivot->toggle == 1); $fusedName = $primaryClients->pluck('company_name')->implode(' & '); if ($primaryClients->count() > 1) { $fusedName .= ' Joint Venture'; } @endphp
@foreach($primaryClients as $cli) @if($cli->logo_url) @endif @endforeach

{{ $fusedName }}

{{ $project->name }}

@if($project->contract_number)

Contract Number: {{ $project->contract_number }}

@endif

Date Issued: {{ now()->format('d F Y') }}

@if($project->cover_image) Project Cover Image @endif
@php /* Other partners after joint venture clients */ $partners = $secondaryClients; @endphp @if($partners->isNotEmpty()) @endif
@foreach($zones as $zone)

{{ $zone->name }}

Date: {{ now()->format('d F Y') }}

@if(!empty($zone->image_path))
{{ $zone->name }}
@endif @foreach($zone->items as $item) @endforeach
Item Design Quantity BoQ Cumulative Volume Progress %
{{ $item->name }} {{ number_format($item->design_quantity, 2) }} {{ $item->display_unit }} {{ number_format($item->boq, 2) }} {{ $item->display_unit }} {{ number_format(optional($item->latestProgressRecord)->cumulative_surveyed_quantity ?? 0, 2) }} {{ $item->display_unit }} {{ number_format($item->completion_percentage, 2) }}%
@endforeach