{{$i + $tickets->firstItem()}} |
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$passenger = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname;
echo $passenger;
}else{
echo "";
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$contact = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->msisdn;
echo $contact;
}else{
echo "";
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$seat = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->seat_id;
$sn = \App\Models\BusSeat::where(['id' => $seat])->first()->naming;
echo $sn;
}else{
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$schedule = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->schedule_id;
$bus_id = \App\Models\Schedule::where(['id' => $schedule])->first()->bus_id;
$bus = \App\Models\Bus::where(['id' => $bus_id])->first()->bus_reg_no;
echo $bus;
}else{
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$schedule = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->schedule_id;
$label = \App\Models\Schedule::where(['id' => $schedule])->first()->label;
echo $label;
}else{
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$schedule = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->schedule_id;
$tDate = \App\Models\Schedule::where(['id' => $schedule])->first()->trip_date;
echo $tDate;
}else{
echo '';
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$schedule = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->schedule_id;
$route = \App\Models\Schedule::where(['id' => $schedule])->first()->route_id;
$pA = \App\Models\Route::where(['id' => $route])->first()->start_point;
$pB = \App\Models\Route::where(['id' => $route])->first()->end_point;
$cA = \App\Models\Cities::where(['id' => $pA])->first()->city;
$cB = \App\Models\Cities::where(['id' => $pB])->first()->city;
echo $cA.' - '.$cB;
}else{
echo '';
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$schedule = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->schedule_id;
$seat = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->seat_id;
$tnxExists = \Illuminate\Support\Facades\DB::table('transactions')->where('schedule_id', $schedule)->where('seat_id', $seat)->count();
if($tnxExists > 0){
$amount = \App\Models\Transaction::where(['seat_id' => $seat, 'schedule_id' => $schedule])->first()->amount_in;
echo $amount;
}else{
$amount = \App\Models\BookingHistory::where(['seat_id' => $seat, 'schedule_id' => $schedule])->first()->fare;
echo $amount;
}
}else{
}
@endphp
|
{{$ticket->printed_date}} |
{{$ticket->qr_code}} |
{{$ticket->fiscal_code}} |
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$agent = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->agent_id;
if($agent == 0){
$name = 'TiketiGala';
}else{
$name = \App\Models\Agent::where(['id' => $agent])->first()->name;
}
echo $name;
}else{
}
@endphp
|
@php
if((\App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->fullname) ?? ''){
$compId = \App\Models\BookingHistory::where(['id' => $ticket->booking_id])->first()->company;
$company = \App\Models\Company::where(['id' => $compId])->first()->name;
echo $company;
}else{
}
@endphp
|
@if($ticket->status == 1)
No
@else
Yes
@endif
|
Print
|
@endforeach