@if (Session::has('success'))
{{ Session::get('success') }}
@elseif (Session::has('danger'))
{{ Session::get('danger') }}
@endif
| Name |
Phone |
Email |
Address |
Country |
Currency |
Logo |
Total Bill |
Total Payments |
{{-- total Due | --}}
Action |
@foreach ($company as $item)
@php
$bookings = $item->id ? App\Models\Booking::where('company_id', $item->id)->get() : collect([]);
$total_bill = $bookings->sum('price') ?? 0;
$total_shipments = $bookings->count() ?? 0;
$payment = $item->name ? App\Models\Payment::where('company_name', $item->name)->sum('payment_amount') : 0;
@endphp
| {{ $item->name }} |
{{ $item->phone }} |
{{ $item->email }} |
{{ $item->address }} |
{{ $item->countries->name ?? '' }} |
{{ $item->currency->symbol ?? '' }} |
 }}) |
{{ $total_bill }} |
{{$payment}} |
{{-- total Due | --}}
|
@endforeach