@extends('layouts.user-app') @section('title', 'Job Details') @section('page_css') @endsection @section('content') @php $decodedContent = json_decode($estimationPayment->other_service) @endphp {{-- @dd($data)--}}
{{--
--}} {{--
--}} {{--
--}} {{--

--}} {{-- Job Details

--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{-- --}} {{-- {{date('d-M-Y',strtotime($estimation->created_at ?? ''))}}
--}} {{--
--}} {{--
--}}

Crew Details

{{-- @if($data->user)--}} {{-- --}} {{-- @else--}} {{-- @endif--}} {{-- @if($estimation->user)--}} {{-- --}} {{-- @else--}} {{-- @endif--}} {{-- @if($estimation->user)--}} {{-- --}} {{-- @else--}} {{-- @endif--}}
--}} {{-- {{$estimation->user->name ?? ''}}--}} {{-- {{$data->name ?? ''}}
--}} {{-- {{$estimation->user->email ?? ''}}--}} {{-- {{$data->email ?? ''}}
--}} {{-- {{$estimation->user->phone ?? ''}}--}} {{-- {{$data->phone ?? ''}}
Fax {{$data->fax ?? ''}}
Country {{$data->country ?? ''}}
City {{$data->city ?? ''}}
Zip {{$data->zip ?? ''}}
Address {{$data->address ?? ''}}

Service Details

Service Title : @foreach($estimationPayment->services as $service) {{$service->title ?? ''}} , @endforeach
Others : @foreach($decodedContent as $services) @foreach($services as $single) {{$single->Service ?? ''}}, @endforeach @endforeach
Estimated Time : {{$data->estimation_time ?? ''}}
Need Financing : {{$data->need_financing ?? ''}}

Transaction Details

Total Amount @foreach($estimationPayment->emailUser->where('type', 'userPayment') as $email) @php $serviceTotalFees = json_decode($email->content) @endphp : ${{$serviceTotalFees->serviceTotalFees ?? ''}} @endforeach
Remaining Amount @foreach ($estimationPayment->emailUser->where('type', 'userPayment') as $email) @php $emailContent = json_decode($email->content); $estimationId = $estimationPayment->id; $filteredPayments = $estimationPayment->userPayment->where('estimation_id', $estimationId) ->where('status', 'paid') ->pluck('payment_type') ->toArray(); @endphp @if (in_array('advance_payment', $filteredPayments)) @if (in_array('remaining_payment', $filteredPayments)) $ 0 @elseif (in_array('full_payment', $filteredPayments)) $ 0 @else $ {{ $emailContent->serviceTotalFees - $emailContent->serviceAdvanceFees ?? '' }} @endif @elseif (in_array('full_payment', $filteredPayments)) $ 0 @else $ {{ $emailContent->serviceTotalFees ?? '' }} @endif @endforeach
@endsection