@php use Carbon\Carbon; $services = \App\Models\EstimationService::with('service')->where('estimation_id',$data->estimation_id)->get(); $userDetails = \App\Models\Estimation::with('user')->where('id',$data->estimation_id)->first(); @endphp

Par5 Construction LLC

@php // Extract the invoice number without the prefix "invoice_" and the file extension ".pdf" $invoiceNumber = preg_replace('/^invoice_|\.pdf$/', '', $pdfFilename); @endphp

INVOICE # {{$invoiceNumber}}

DATE: {{ isset($data->created_at) ? Carbon::parse($data->created_at)->format('F j, Y') : '' }}

26714 Grey Swan Dr.
Katy, Texas, 77494

@if($userDetails->user !== null)

Customer name: {{$userDetails->user->name ?? ''}}
Address: {{$userDetails->user->address ?? ''}}
City, State, Zip: {{$userDetails->user->city ?? ''}},{{$userDetails->user->country ?? ''}} ,{{$userDetails->user->zip ?? ''}}

TOTAL: ${{$data->payment_transaction}}

@else

Customer name: {{$userDetails->first_name . ' ' . $userDetails->last_name ?? ''}}
Address: {{$userDetails->address ?? ''}}
City, State, Zip: Null

TOTAL: ${{$data->payment_transaction}}

@endif

Notes


Use this space for comments to your client.

{{-- --}} @foreach($services as $service) @endforeach
Item Description Quantity Price PerTotal
{{$service->service->title ?? ''}} Single Merge Price

Payment Type: {{$data->payment_type}}

Subtotal: ${{$data->payment_transaction}}

Tax - 0%: $0.00

TOTAL: ${{$data->payment_transaction}}

{{--
--}} {{--

{{$data->payment_type}}

--}} {{--

${{$data->payment_transaction}}

--}} {{--

$0.00

--}} {{--

${{$data->payment_transaction}}

--}} {{--
--}}