@extends('layouts.user-app') @section('title', 'Job Details') @section('page_css') @endsection @section('content') @php $decodedContent = json_decode($estimationPayment->other_service) @endphp {{-- @dd($data)--}}
| --}} {{-- --}} {{-- | --}} {{--{{date('d-M-Y',strtotime($estimation->created_at ?? ''))}} | --}} {{--
| {{-- @if($data->user)--}} {{-- | --}} {{-- {{$estimation->user->name ?? ''}}--}} {{-- | --}} {{-- @else--}}{{$data->name ?? ''}} | {{-- @endif--}}
| {{-- @if($estimation->user)--}} {{-- | --}} {{-- {{$estimation->user->email ?? ''}}--}} {{-- | --}} {{-- @else--}}{{$data->email ?? ''}} | {{-- @endif--}}
| {{-- @if($estimation->user)--}} {{-- | --}} {{-- {{$estimation->user->phone ?? ''}}--}} {{-- | --}} {{-- @else--}}{{$data->phone ?? ''}} | {{-- @endif--}}
| Fax | {{$data->fax ?? ''}} | |
| Country | {{$data->country ?? ''}} | |
| City | {{$data->city ?? ''}} | |
| Zip | {{$data->zip ?? ''}} | |
| Address | {{$data->address ?? ''}} |
| 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 ?? ''}} |
| 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 |