| Estimation ID | Name | Service | Payment Type | Service Total Payment | Transaction Amount | Remaining Amount | Status | Transaction Date | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{$payment->estimation->id}} | @if($payment->estimation->user){{$payment->estimation->user->name ?? ''}} | {{$payment->estimation->user->email ?? ''}} | @else @php $user = DB::table('users')->where('email', $payment->estimation->email)->first(); @endphp{{$user->name ?? ''}} | {{$user->email ?? ''}} | @endif@if($payment->estimation->services->count() > 1 || $payment->estimation->others != null) multiple @elseif($payment->estimation->services->count() == 1) {{$payment->estimation->services->first()->title ?? ''}} @endif | {{$payment->payment_type ?? ''}} | @foreach($payment->estimation->emailUser->where('type', '==', 'userPayment') as $email) @php $serviceTotalFees = json_decode($email->content) @endphp${{$serviceTotalFees->serviceTotalFees ?? ''}} | @endforeach${{$payment->payment_transaction ?? ''}} | @foreach($payment->estimation->emailUser->where('type', '==', 'userPayment') as $email) @php $serviceTotalFees = json_decode($email->content) @endphp@if($payment->payment_type == 'remaining_payment') ${{$serviceTotalFees->serviceAdvanceFees - $payment->payment_transaction ?? ''}} @else ${{$serviceTotalFees->serviceTotalFees - $payment->payment_transaction ?? ''}} @endif | @endforeach{{$payment->status ?? ''}} | {{$payment->created_at->diffForHumans() ?? ''}} |