{{--
--}} {{-- --}} {{----}} @if($companyLogo != null || $companyLogo != "") @else{{ $company }}@endif Address: P.O Box 127 Morogoro, TanzaniaTel: +255 (0) 23 2613 851 / 589 Fax: +255 (0) 23 2603 039 Email: info@aboodgroup.com Website: www.aboodbus.co.tz TIN: 100-756-927 |
|
S/N | Sub Route | Tickets | Total Collection | Total Expenses | Net Collection | |||
---|---|---|---|---|---|---|---|---|
{{$i+1}} | {{$summary->origin}} - {{$summary->destination}} | {{$summary->tickets}} | {{number_format($summary->amount, 2)}} | |||||
Total: | {{ $count_summary }} | {{number_format($bookings_gross_collection, 2)}} | {{-- | --}} {{-- {{number_format($bookings_gross_collection, 2)}} | --}} {{--{{number_format($bookings_comission, 2)}} | --}} {{--{{number_format($bookings_net_collection, 2)}} | --}}
S/N | Passenger | Seat | Ticket | Contact | Origin | Destination | Issued | {{--Agent | --}}Agent | {{--Booked | --}}Fare | Exps | Net | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{$i+1}} | {{$booking->fullname}} @php if($booking->gender == "Male" && $booking->age == "Adult"){ echo "(M-A)"; }else if($booking->gender == "Female" && $booking->age == "Adult"){ echo "(F-A)"; }else if($booking->gender == "Male" && $booking->age == "Child"){ echo "(M-C)"; }else if($booking->gender == "Female" && $booking->age == "Child"){ echo "(F-C)"; } @endphp | {{ \App\Models\BusSeat::where(['id' => $booking->seat_id])->first()->naming }} | {{$booking->reference}} | {{$booking->msisdn}} | @php if($booking->sub_route_id == null){ $pA = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->start_point; $pB = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->end_point; $pointA = \App\Models\Cities::where(['id' => $pA])->first()->city; $pointB = \App\Models\Cities::where(['id' => $pB])->first()->city; echo $pointA; }else{ $from = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointA; $to = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointB; echo $from; } @endphp | @php if($booking->sub_route_id == null){ $pA = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->start_point; $pB = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->end_point; $pointA = \App\Models\Cities::where(['id' => $pA])->first()->city; $pointB = \App\Models\Cities::where(['id' => $pB])->first()->city; echo $pointB; }else{ $from = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointA; $to = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointB; echo $to; } @endphp | @php $date = $booking->created_at; echo $date; @endphp | {{----}} {{-- @php--}} {{-- $agent = \App\Models\Agent::where(['id' => $booking->agent_id])->first()->name;--}} {{-- echo $agent;--}} {{-- @endphp--}} {{-- | --}}@php $agent = \App\Models\Agent::where(['id' => $booking->agent_id])->first()->name; echo $agent; @endphp | {{--{{$booking->booking_date}} | --}}@php $fare = $booking->fare; echo number_format($fare, 0); $gross_collection += $fare; @endphp | @php $fare = $booking->fare; $agent = $booking->agent_id ? $booking->agent_id : ''; $commission = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->commission; $net_commission = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->fixedCommission; $type = \App\Models\AgentCompany::where(['agent' => $agent])->first()->type ? \App\Models\AgentCompany::where(['agent' => $agent])->first()->type : ''; $totalFare = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->price; @endphp | @php $agent = $booking->agent_id; $fare = $booking->fare; $price = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->price; $commission = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->commission; $net_commission = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->fixedCommission; $type = \App\Models\AgentCompany::where(['agent' => $agent])->first()->type ? \App\Models\AgentCompany::where(['agent' => $agent])->first()->type : ''; if($type == 2){ if($booking->sub_route_id == "2001"){ if($fare == "45000"){ $net_commission = 10000; $netPrice = ($booking->fare) - $net_commission; echo number_format($netPrice, 0); $net_collection += $netPrice; }elseif ($fare == "40000"){ $net_commission = 5000; $netPrice = ($booking->fare) - $net_commission; echo number_format($netPrice, 0); $net_collection += $netPrice; }elseif ($fare == "35000"){ $net_commission = 0; $netPrice = ($booking->fare) - $net_commission; echo number_format($netPrice, 0); $net_collection += $netPrice; } }else{ if($fare >= $price){ $netPrice = ($booking->fare) - $net_commission; echo number_format($netPrice, 0); $net_collection += $netPrice; }else{ $netPrice = ($booking->fare) - 0; echo number_format($netPrice, 0); $net_collection += $netPrice; } } }else{ $netPrice = ($booking->fare) - 0; echo number_format($netPrice, 0); $net_collection += $netPrice; } @endphp | |||
'.$x.' | ||||||||||||||||
{{-- | Driver: | --}} {{--Conductor: | --}}Total: | {{number_format($gross_collection, 0)}} | {{number_format($comission_collection, 0)}} | {{number_format($net_collection, 0)}} | {{--{{number_format($bookings_gross_collection, 2)}} | --}} {{--{{number_format($bookings_comission, 2)}} | --}} {{--{{number_format($bookings_gross_collection - $bookings_comission)}} | --}}