@extends('layouts.user-app') @section('content')
| Service | Crew Name | Service Total Payment | Service Remaining Payment | Crew Progress | Status | Daily Logs | View | Services | ||
|---|---|---|---|---|---|---|---|---|---|---|
@if($estimation->services->count() > 1 || $estimation->others != null)
Multiple
@elseif($estimation->services->count() == 1)
{{$estimation->services->first()->title ?? ''}}
@endif
|
@foreach($estimation->emailUser->where('type', 'crewVisit') as $email)
@php
$crewName = json_decode($email->content)
@endphp
{{$crewName->crewName ?? ''}} | @endforeach @foreach($estimation->emailUser->where('type', 'userPayment') as $email) @php $serviceTotalFees = json_decode($email->content) @endphp${{$serviceTotalFees->serviceTotalFees ?? ''}} | @endforeach @foreach ($estimation->emailUser->where('type', 'userPayment') as $email) @php $emailContent = json_decode($email->content); $estimationId = $estimation->id; $filteredPayments = $estimation->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{{$estimation->crew_progress ?? ''}} | {{$estimation->status ?? ''}} | @if($services->count() > 1) |
View All Services
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- | --}}
@else
Single Service | @endif||