@extends('public.layouts.default') @section('title') | Payment @endsection @section('stylesheets') @endsection @section('content')

Payment

@if(Auth::check() == FALSE) @endif
@php $Cost = Helper::getTotalRideCost($rideReservation, $vehicle); $total_distance = Helper::getRideTotalDistance($rideReservation); $is_free = false; // $basePrice = (Helper::checkDistanceStatus($total_distance) == true) ? $vehicle->base_price : 0; $basePrice = 0; $tip_amount = $rideReservation->driver_tip_amount; $coupon_discount = $rideReservation->discount_amount; if($rideReservation->round_trip_detail == null){ $Child_sets = ($Settings->child_safety_seat_rate * $rideReservation->child_safety_seat); }else{ $Child_sets = ($Settings->child_safety_seat_rate * ($rideReservation->child_safety_seat + $rideReservation->round_trip_detail->child_safety_seat)); } $roundTripPrearrangeCharges = 0; if($rideReservation->round_trip == 1){ if ($rideReservation->ride_type == "hourly") { $price = Helper::getHourlyPrice($rideReservation->ride_duration, $vehicle->hourly_price); $Round_trip_discount = (((($price)+($Child_sets)) * $Settings->round_trip_discount/100)); } else { $roundTripPrearrangeCharges = Helper::getRoundTripPreArrangedCharges($vehicle->type, $rideReservation); $Round_trip_discount = number_format(((($Cost + $basePrice)+($Child_sets)) * $Settings->round_trip_discount/100),2,'.',''); } } else { $Round_trip_discount = 0; } // Coupon Discount if($rideReservation->coupon_code != null && $rideReservation->coupon_value != null){ if($rideReservation->coupon_type == 'flat'){ $coupon_discount = $rideReservation->coupon_value; }else{ $total = $Cost + $Child_sets; $coupon_discount = $total* $rideReservation->coupon_value/100; } }else{ $coupon_discount = 0; } $preArrangedCharges = Helper::getPickUpAirportPreArrangedCharges($vehicle->type, $rideReservation)+$roundTripPrearrangeCharges; $stoppageCharge = $rideReservation->stoppage_charge; if ($rideReservation->round_trip_detail != null) { $stoppageCharge += $rideReservation->round_trip_detail->stoppage_charge; } $singleTripPrearrangeCharges=Helper::getPickUpAirportPreArrangedCharges($vehicle->type, $rideReservation); if($isFirstRide == 'true'){ $ride_discount = $Settings->first_ride_discount; $amount = number_format($Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount - $ride_discount,2,'.',''); if($amount <=0) { $amount = 0 ; $is_free = true; } $Tax = number_format(($amount * $Settings->tax/100),2,'.',''); if ($rideReservation->ride_type == "hourly") { $price = Helper::getHourlyPrice($rideReservation->ride_duration, $vehicle->hourly_price); $Tax = (($price + $Child_sets - $Round_trip_discount - $ride_discount) * $Settings->tax/100); $Total = $price + $Child_sets - $Round_trip_discount - $ride_discount + $Tax + $preArrangedCharges + $stoppageCharge; } else { $Total = $amount + $Tax + $preArrangedCharges + $stoppageCharge; } }else{ $amount = number_format($Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount,2,'.',''); if($amount <=0) { $amount = 0; $is_free = true; } $Tax = number_format(($amount * $Settings->tax/100),2,'.',''); if ($rideReservation->ride_type == "hourly") { $price = Helper::getHourlyPrice($rideReservation->ride_duration, $vehicle->hourly_price); $Tax = (($price + $Child_sets - $Round_trip_discount) * $Settings->tax/100); $Total = $price + $Child_sets - $Round_trip_discount + $Tax + $preArrangedCharges + $stoppageCharge; } else { $Total = $amount + $Tax + $preArrangedCharges + $stoppageCharge; } } $tip_percentage = $rideReservation->driver_tip_percentage; $tip_amount = round($Total*$tip_percentage/100,2); $Total = $Total + $tip_amount; $amount1 = number_format($Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount - $Settings->first_ride_discount,2,'.',''); if($amount1 <=0) { $amount1 = 0; } $taxAmount = number_format(($amount1 * $Settings->tax/100),2, '.', ''); $tipAmount = number_format((($amount1 + $taxAmount + $preArrangedCharges + $stoppageCharge ) * $rideReservation['driver_tip_percentage']/100), 2, '.', ''); // $getTotal = number_format($Cost + $basePrice + $Child_sets - $Round_trip_discount - $Settings->first_ride_discount + $taxAmount + $preArrangedCharges + $stoppageCharge + $tipAmount, 2, '.', ''); $couponDis = 0; // if($rideReservation->coupon_type != null && $rideReservation->coupon_type == 'flat') // { // $couponDis = $rideReservation->discount_amount; // }else{ // $couponDis = $getTotal*$rideReservation->coupon_value/100; // } $totalAmount = number_format($amount1 + $taxAmount + $preArrangedCharges + $stoppageCharge + $tipAmount, 2, '.', ''); @endphp

Ride Summary

Total

Ride ID {{$rideReservation->id}}

@if ($rideReservation->ride_type == "hourly")

${{ number_format((Helper::getHourlyPrice($rideReservation->ride_duration, $vehicle->hourly_price)),2,'.','') }}

@else

${{ number_format(($Cost+$basePrice),2,'.','') }}

@endif

@if($rideReservation->pickup_airport_id == Null) {{ $rideReservation['pickup_address'] }} @else {!! html_entity_decode(Helper::getAirportName($rideReservation->pickup_airport_id)) !!}
Terminal: {{ Helper::getTerminalName($rideReservation['pickup_terminal_id']) }}
@endif

To

@if($rideReservation->droppof_airport_id == NULL) {{ $rideReservation['dropof_address'] }} @else {!! html_entity_decode(Helper::getAirportName($rideReservation->droppof_airport_id)) !!}
{{-- Terminal: {{ Helper::getTerminalName($rideReservation['dropof_terminal_id']) }}
--}} @endif

{{ date('D, M j Y', strtotime($rideReservation->pickup_date))}} @ {{$rideReservation->pickup_time}}

@if ($rideReservation->round_trip == 1 && $rideReservation->round_trip_detail != null)

Round Trip

@if($rideReservation->round_trip_detail->pickup_airport_id == Null) {{ $rideReservation->round_trip_detail['pickup_address'] }} @else {!! html_entity_decode(Helper::getAirportName($rideReservation->round_trip_detail->pickup_airport_id)) !!}
{{-- Terminal: {{ Helper::getTerminalName($rideReservation->round_trip_detail['pickup_terminal_id']) }}
--}} @endif

To

@if($rideReservation->round_trip_detail->droppof_airport_id == NULL) {{ $rideReservation->round_trip_detail['dropof_address'] }} @else {!! html_entity_decode(Helper::getAirportName($rideReservation->round_trip_detail->droppof_airport_id)) !!}
{{--
--}} @endif

{{ date('D, M j Y', strtotime($rideReservation->round_trip_detail->pickup_date))}} @ {{$rideReservation->round_trip_detail->pickup_time}}

@endif
{{--

Base Price

${{ number_format($basePrice,2,'.','') }}

--}} @if($Settings->child_safety_seat == 1) @if($rideReservation->round_trip_detail == null)

Child seats ({{$rideReservation->child_safety_seat}})

${{ number_format($Child_sets,2,'.','') }}

@else

Child seats ({{$rideReservation->child_safety_seat+$rideReservation->round_trip_detail->child_safety_seat}}) (Include Round Trip)

${{ number_format($Child_sets,2,'.','') }}

@endif @endif @if($rideReservation->round_trip == 1)

Round Trip Discount ({{ $Settings->round_trip_discount }}%)

${{ number_format($Round_trip_discount,2,'.','') }}

@endif @if($rideReservation->discount_amount != null)

{{$rideReservation->coupon_code}}

(Offer Applied)

Remove

@else

Apply Coupon

@endif @if($rideReservation->discount_amount != null)
@if($rideReservation['coupon_type'] == 'flat')

Coupon Discount

@else

Coupon Discount ({{$rideReservation['coupon_value']}}%)

@endif

${{ number_format($coupon_discount,2,'.','') }}

{{-- --}}
@endif @if($isFirstRide == 'true') @if($Settings->first_ride_discount > 0)

First Ride Discount

${{ number_format($ride_discount,2,'.','') }}

@endif @else @endif

Tax ({{$Settings->tax}}%)

${{ number_format($Tax,2,'.','') }}

Pre Arranged Charges

${{ number_format($preArrangedCharges,2,'.','') }}

{{-- @if (Helper::getPickUpAirportPreArrangedCharges($vehicle->type, $rideReservation) != 0) @endif --}} {{-- @if($rideReservation->pickup_airport_id == env('PEARSON_AIRPORT_ID')) @if(Helper::getPreArrangedCharges($vehicle->type) != 0)

Pre Arranged Charges

${{ number_format(Helper::getPreArrangedCharges($vehicle->type),2,'.','') }}

@endif @endif --}} @if ($stoppageCharge != null)

Stoppage Charges

${{ number_format($stoppageCharge,2,'.','') }}

@endif @if($rideReservation['driver_tip_percentage'] != 0 && $Settings->tip_status == 1)

Tip ({{$rideReservation['driver_tip_percentage']}}%)

${{ number_format($tip_amount,2,'.','') }}

@endif {{Helper::activity('Payment Page','Payment Page',session()->get('reservation_id'),null,$Total > 0 ? number_format($Total,2) : 0,null)}} {{ $Total > 0 ? number_format($Total,2) : 0 }}
Secure Norton
@endsection @section('scripts') @parent @endsection