@if($vehicle->image == null)
@else
@endif
@php
$Cost = Helper::getTotalRideCost($rideReservation, $vehicle);
$total_distance = Helper::getRideTotalDistance($rideReservation);
// $basePrice = (Helper::checkDistanceStatus($total_distance) == true) ? $vehicle->base_price : 0;
$basePrice = 0;
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)+($Settings->child_safety_seat_rate * $rideReservation->child_safety_seat))*$Settings->round_trip_discount/100);
} else {
$roundTripPrearrangeCharges = Helper::getRoundTripPreArrangedCharges($vehicle->type, $rideReservation);
// $Round_trip_discount = (($total_distance * $vehicle->rate + $basePrice + ($Child_sets))*$Settings->round_trip_discount/100);
$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; }
// if($rideReservation->pickup_airport_id == env('PEARSON_AIRPORT_ID')){
// if(Helper::getPreArrangedCharges($vehicle->type) != 0){
// $preArrangedCharges = Helper::getPreArrangedCharges($vehicle->type);
// }else{
// $preArrangedCharges = 0;
// }
// }else{
// $preArrangedCharges = 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;
}
if($isFirstRide == 'true'){
$ride_discount = $Settings->first_ride_discount;
//$forTip = ($Settings->tip_status == 1) ? $Cost + $basePrice + $Child_sets - $Round_trip_discount - $ride_discount : 0;
$amount = $Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount - $ride_discount;
if($amount <=0)
{
$amount = 0;
}
$Tax = number_format((($amount) * $Settings->tax/100),2,'.','');
// $Tax = number_format((($Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount - $ride_discount) * $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{
//$forTip = ($Settings->tip_status == 1) ? $Cost + $basePrice + $Child_sets - $Round_trip_discount : 0;
$amount = $Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount;
if($amount <=0)
{
$amount = 0;
}
$Tax = number_format((($amount) * $Settings->tax/100),2,'.','');
// $Tax = number_format((($Cost + $basePrice + $Child_sets - $Round_trip_discount - $coupon_discount) * $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;
}
}
// if($Total == 0 || $Total < 0)
// {
// $Total = 1;
// $Tax = 0;
// $preArrangedCharges = 0;
// }
$forTip = ($Settings->tip_status == 1) ? $Total : 0;
@endphp
@if($vehicle->vehicle_title == null)
{{ $vehicle->type }}
@else
{{ $vehicle->vehicle_title }}
@endif
{{$vehicle->vehicle_make_name }}
{{ $vehicle['capacity'] }} Passengers
{{ $vehicle['airbag'] }} Bags
{{-- {{ $vehicle['gear'] == 1 ? 'Automatic' : 'Manual' }} --}}
{{--
Total
$ {{ $Total > 0 ? $Total : 0 }}
--}}
{{--
{{ $vehicle->class }} Car
{{$vehicle->make_vehicle->name }}
{{ $vehicle['capacity'] }} Passengers
{{ $vehicle['airbag'] }} Bags
{{-- {{ $vehicle['gear'] == 1 ? 'Automatic' : 'Manual' }} --}}{{--
Total
$ {{ $Total > 0 ? $Total : 0 }}
--}}
{{--
--}}
{{--
--}}
{{--
Vehicle Features
--}}
{{--
--}}
{{-- Vehicle Features --}}
{{-- @if($vehicle->type != NULL)
{{ $vehicle['type'] }}
@endif --}}
{{-- @if($vehicle->model_vehicle)
{{ $vehicle->model_vehicle->name }}
@endif --}}
{{-- @if($vehicle['capacity'])
Capacity : {{$vehicle['capacity']}}
@endif --}}
{{-- @if($vehicle['airbag'])
Airbags : {{ $vehicle['airbag'] }}
@endif --}}
{{-- @if($vehicle['color'])
Color : {{ $vehicle['color'] }}
@endif --}}
{{-- @if($vehicle['fuel'] == 1 )
Fuel
@endif
@if($vehicle['radio'] == 1 )
Radio
@endif
@if($vehicle['ac'] == 1 )
Air Conditioning
@endif
@if($vehicle['child_safety_seat'] == 1 )
Child Safety Seats
@endif --}}
{{--
--}}
Price Details
{{--
Distance {{ $rideReservation->round_trip == 1 ? '(Round Trip)' : '' }} {{$rideReservation->total_distance}} km
--}}
{{--
Base Price
${{ number_format($basePrice,2,'.','') }}
--}}
@if ($rideReservation->ride_type == "hourly")
Ride Charges ${{ number_format(Helper::getHourlyPrice($rideReservation->ride_duration, $vehicle->hourly_price),2,'.','') }}
@else
Ride Charges ${{ number_format($Cost+$basePrice,2,'.','') }}
@endif
@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}})(Including 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
Coupon Discount
@if($rideReservation->coupon_type == 'percentage')
({{ $rideReservation->coupon_value }}%)
@endif
${{ number_format($coupon_discount, 2) }}
@else
@if(Auth::check())
Apply Coupon
Apply
@endif
@endif
@if($isFirstRide == 'true')
@if($Settings->first_ride_discount > 0)
First Ride Discount (${{ $Settings->first_ride_discount }}) ${{ number_format($ride_discount,2,'.','') }}
@endif
@endif
@if($Settings->tax != NULL)
Tax ( {{$Settings->tax}})% ${{ number_format($Tax,2,'.','') }}
@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 ($preArrangedCharges != 0)
Pre Arranged Charges ${{ $preArrangedCharges }}
@endif
@if ($stoppageCharge != null)
Stoppage Charges ${{ number_format($stoppageCharge,2,'.','') }}
@endif
@if ($Settings->tip_status == 1)
@endif
{{--
$
--}}
{{Helper::activity('Confirmation Page','Ride Confirmation',session()->get('reservation_id'),null,$Total > 0 ? number_format($Total,2) : 0,$rideReservation->vehicle_detail_id)}}
Grand total {{ $Total > 0 ? number_format($Total,2) : 0 }} $
{{--
Rates, taxes, and fees do not reflect rates, taxes and fees applicable to non-included optional
coverages or extras added later. In select locations outside the U.S., Canada, UK, Ireland, France,
Germany and Spain, the rates, taxes and fees may also not reflect coverages required if the customer fails
to provide acceptable proof of current liability coverages.
--}}