@if($status=="passenger")
<table>
<tr><th>{{ __('Count') }}</th>
                    <th>{{ __('Ticket Number') }}</th>
                    <th>{{ __('Price') }}</th>
                    <th>{{ __('Price_Bags') }}</th>
                    <th>{{ __('Surname') }}</th>
                    <th>{{ __('Full Name') }}</th>
                    <th>{{ __('Gender') }}</th>
                    <th>{{ __('Date of birth') }}</th>
                    <th>{{ __('Place of birth') }}</th>
                    <th>{{ __('Nationality') }}</th>
                    <th>{{ __('Passport No') }}</th>
                    <th>{{ __('Expiry') }}</th>
                    <th>{{ __('NEG PCR YES/NO') }}</th>
                    <th>{{ __('VACC 1ST DOSE/Date') }}</th>
                    <th>{{ __('VACC 2ND DOSE/Date') }}</th>
                    <th>{{ __('DAILY TEMPRATURE LIST') }}</th>
                    <th>{{ __('Phone Number') }}</th>
                    <th>{{ __('Dep Date') }}</th>
                    <th>{{ __('Arv Date') }}</th>
                    <th>{{ __('With Car') }}</th>
                    <th>{{ __('Plate Number') }}</th>
                    <th>{{ __('Chassis Number') }}</th>
                    <th>{{ __('Engine Number') }}</th>
                    <th>{{ __('Green.in.NO') }}</th>
                    <th>{{ __('Room') }}</th>
                    <th>{{ __('Number bags') }}</th>
                    <th>{{ __('Weight bags') }}</th>
                 </tr>
                 @foreach ($tickets as $ticket)
                 <tr>
                    <td></td>
                    <td>{{ $ticket->ticket_number }}</td>
                    <td>{{ FormatPrice($ticket->price) }}</td>
                    <td>{{FormatPrice(optional($ticket->boardingPass)->amount) }}</td>
                    <td>{{ $ticket->lastName }}</td>
                    <td>{{ $ticket->firstName }}</td>
                    <td>{{ $ticket->gender }}</td>
                    <td>{{ $ticket->birth_date }}</td>
                    <td>{{ $ticket->place_of }}</td>
                    <td >{{ $ticket->nationality }}</td>
                    <td>{{ $ticket->passport }}</td>
                    <td>{{ $ticket->expiry_date }}</td>
                    <td></td>
                    <td >{{ $ticket->vacc1n_name }}<br>{{ $ticket->vacc1n_date}}</td>
                    <td>{{ $ticket->vacc2n_name }}<br>{{ $ticket->vacc2n_date}}</td>
                    <td></td>
                    <td dir="ltr">{{ $ticket->phone }}</td>
                    <td>{{ $ticket->segment->cruise->name.' '.$ticket->segment->cruise->departure_date_time  }}</td>
                    <td>{{ $ticket->segment->cruise->name.' '.$ticket->segment->cruise->arrival_date_time  }}</td>
                    <td>{{ $ticket->car? 'Yes': 'No' }}</td>
                   
                    <td>{{$ticket->car&&isset($ticket->car->details['green_insurance_number'])?$ticket->car->details['green_insurance_number']:'--'}}</td>
                    <td>{{$ticket->boardingPass&&$ticket->boardingPass->room?$ticket->boardingPass->room->code:'' }} </td>
                    <td>{{$ticket->boardingPass?$ticket->boardingPass->number_bags:'' }} </td>
                    <td>{{ $ticket->boardingPass?$ticket->boardingPass->weight_bags:''}} </td>
                 </tr>
                 @endforeach
             </table>
@else
<table>
<tr><th>{{ __('Count') }}</th>
                
                    <th>{{ __('image') }}</th>
                    <th>{{ __('Passport No') }}</th>
                  
                 </tr>
                 @foreach ($tickets as $ticket)
                 <tr>
                    <td></td>
                    @if($ticket->passport_file !=null)
                      <td><img src="{{URL::to('/').'/uploads/passport/'.$ticket->passport_file }}" width="200px" alt=""> </td>
                    @else
                    <td>--</td>
                    @endif
                    <td>{{ $ticket->passport }}</td>
                 
                 </tr>
                 @endforeach
             </table>

@endif