@extends('admin.layout.template') @section('title', 'Project Details') @section('content')
{{-- ================= PROJECT HEADER ================= --}}
{{-- LEFT SIDE --}}

{{ $project->project_name }} {{ $project->project_number }}

Customer : {{ $project->customer_name }}

Phone : {{ $project->customer_phone }}

Address : {{ $project->address }}

Project Type : {{ $project->project_type ?? '-' }}

Expected Completion : {{ $project->expected_completion_date ? \Carbon\Carbon::parse($project->expected_completion_date)->format('d M Y') : '-' }}

Status : {{ ucfirst($project->status) }}

{{-- RIGHT SIDE --}}

Employee : {{ $project->employee_name ?? '-' }}

Contact : {{ $project->employee_contact ?? '-' }}

{{-- PDF Buttons --}}
Subtotal

₹ {{ number_format($project->subtotal, 2) }}

GST (18%)

₹ {{ number_format($project->tax, 2) }}

Grand Total

₹ {{ number_format($project->grand_total, 2) }}

{{-- ================= PROJECT SUMMARY ================= --}}
Total Areas

{{ $project->areas->count() }}

Total Items

{{ $project->areas->sum(fn($area) => $area->items->count()) }}

Created At
{{ $project->created_at->format('d M Y') }}
{{-- ================= AREAS LOOP ================= --}} @foreach($project->areas as $area)
Area: {{ $area->name }} @if($area->room) (Room: {{ $area->room->name }}) @endif
@if($area->items->count() > 0)
@foreach($area->items as $index => $item) {{-- SL --}} {{-- IMAGE --}} {{-- PRODUCT --}} {{-- SKU --}} {{-- QTY --}} {{-- SIZE --}} {{-- ROOM --}} {{-- ITEM CATEGORY --}} {{-- CATALOG --}} {{-- SERIAL --}} {{-- DESCRIPTION --}} @endforeach
# Image Product SKU Qty Size Room Item Catalog Serial Description
{{ $index + 1 }} @if($item->is_custom == 0 && $item->variant?->primaryImage?->image_path) @else No Image @endif {{ $item->product->name ?? 'N/A' }} {{ $item->variant->sku ?? '-' }} {{ $item->quantity ?? 1 }} @if($item->measurement) {{ $item->measurement->width ?? '-' }} x {{ $item->measurement->height ?? '-' }} {{ $item->measurement->unit ?? '' }} @else - @endif {{ $area->area_name ?? $area->name ?? '-' }} {{ ucfirst($item->category ?? '-') }} {{ $item->curtain->catalogue ?? $item->wallpaper->catalogue ?? $item->sofa->fabric_catalogue ?? '-' }} {{ $item->curtain->serial_no ?? $item->wallpaper->serial_no ?? $item->sofa->serial_no ?? '-' }} {{ $item->notes ?? '-' }}
@else

No items found in this area.

@endif
@endforeach Back to Projects
@endsection