BUS OPERATOR

@php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $route = \App\Models\Schedule::where(['id' => $schedule])->first()->route_id; $comp = \App\Models\Route::where(['id' => $route])->first()->company; $company = \App\Models\Company::where(['id' => $comp])->first()->name; echo $company; @endphp

@php $schedule = \App\Models\Booking::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; @endphp

Tarehe : @php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $tDate = \App\Models\Schedule::where(['id' => $schedule])->first()->trip_date; echo $tDate; @endphp
Muda : @php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $departure = \App\Models\Schedule::where(['id' => $schedule])->first()->departure; echo $departure; @endphp
Daraja : @php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $route = \App\Models\Schedule::where(['id' => $schedule])->first()->route_id; @endphp @if(\App\Models\Route::where(['id' => $route])->first()->class == 1) VVIP @elseif(\App\Models\Route::where(['id' => $route])->first()->class == 2) VIP @elseif(\App\Models\Route::where(['id' => $route])->first()->class == 3) LUXURY @elseif(\App\Models\Route::where(['id' => $route])->first()->class == 4) SEMI-LUXURY @else ORDINARY @endif
Label : @php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $label = \App\Models\Schedule::where(['id' => $schedule])->first()->label; echo $label; @endphp

Passenger

Seat #

Sub Total

@php $passenger = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->fullname; echo $passenger; @endphp

@php $seat = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->seat_id; $sn = \App\Models\BusSeat::where(['id' => $seat])->first()->naming; echo $sn; @endphp

@php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $seat = \App\Models\Booking::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{ echo ''; } @endphp

tax

0.00

Total

@php $schedule = \App\Models\Booking::where(['id' => $ticket->booking_id])->first()->schedule_id; $seat = \App\Models\Booking::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{ echo ''; } @endphp

{{--
--}} {{-- @php--}} {{-- return \SimpleSoftwareIO\QrCode\Facades\QrCode::size(300)->backgroundColor(255,255,0)->generate('Wilson');--}} {{-- @endphp--}} {{-- {!! \SimpleSoftwareIO\QrCode\Facades\QrCode::size(100)->backgroundColor(255,255,0)->generate('Wilson'); !!}--}} {{--
--}}
FISCAL CODE