<?php
if (isset($this->booking_info)) {
    $vehicle_info = $this->booking_info;

    $booking_info_detail = $this->booking_info[0];

    $booking_ref_no = $booking_info_detail['ref'];
    $vehicle_type = $booking_info_detail['vehicle'];
    $pickup_city = $booking_info_detail['pickup_city'];
    $pickup_address = $booking_info_detail['departure'];
    $pickup_date = $booking_info_detail['ordertime'];
    $pickup_time = $booking_info_detail['ordertime'];
    $adults = $booking_info_detail['adults'];
    $childs = $booking_info_detail['childs'];
    $luggage = $booking_info_detail['luggages'];
    $booking_date = date('d-M-Y',strtotime($booking_info_detail['booking_date']));
    $booking_time = $booking_info_detail['booking_time'];
    $booking_release_date = $booking_info_detail['booking_release_date'];

    $client_name   = explode(' ',$booking_info_detail['clientname']);
    $client_first_name = $client_name[0];
    $client_last_name = $client_name[1];
    $client_mobile = $booking_info_detail['client_mobile'] ;
    $client_email = $booking_info_detail['client_email'] ;
    $client_alt_mobile = $booking_info_detail['client_alt_mobile'] ;

    $cancellation_rule = $booking_info_detail['booking_cancellation_rule'];
    $estimated_time = $booking_info_detail['estimated_time'];
    $estimated_distance = $booking_info_detail['estimated_distance'];


    $base_fare      = $booking_info_detail['minimum_charge'];
    $min_pkg_hrs    = $booking_info_detail['approx_after_hour'];
    $min_pkg_km     = $booking_info_detail['approx_distance_charge'];
    $total_price    = $booking_info_detail['estimated_final_price'];
    $per_km_price   = $booking_info_detail['approx_distance_charge'];
    $per_hr_charge  = $booking_info_detail['approx_hour_charge'];

    $night_rate_begins = $booking_info_detail['night_rate_begins'];
    $night_rate_ends = $booking_info_detail['night_rate_ends'];
    $night_charge_price = $booking_info_detail['night_charge_price'];
    $remark = $booking_info_detail['remark'];

    $data = $vehicle_info;
}
?>
<!--<script src='https://www.google.com/recaptcha/api.js'></script>-->
<section id="main_form" class="padding12top">
    <div class="banner-bottom pcenter" >
        <!-- container -->
        <div class="container">
            <div class="row">

                <div class="banner-bottom-grids">

                    <div class="col-md-9 banner-bottom-grid">
                        <div id="accordion" class="panel-group">
                            <div class="panel panel-default">


                                <div class="row">
                                    <div class="col-sm-12">
                                        <div style="height:auto;width:100%;">


                                            <table class="table table-bordered" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
                                                <tr>
                                                    <td colspan="0">
                                                        <table border="1" align="center" cellpadding="0" cellspacing="0" width="100%">
                                                            <tr>

                                                                <td align="left" class="paddinT5R0L5B5" colspan="2">
                                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td class="invoice-td-class">
                                                                                <div class="col-sm-2 vertical-align-top">
                                                                                    <img src="/images/logo.png" />
                                                                                </div>



                                                                                <div class="col-sm-4  pull-right new1" >

                                                                                    <strong>Booking No. :</strong> <?php echo $booking_ref_no;?> <br />
                                                                                    <strong>Booking Date :</strong> <?php echo $booking_date;?><br />
                                                                                    <strong>Booking Time :</strong> <?php echo $booking_time;?>

                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <div class="col-sm-12 no-padding center new1" >
                                                                                    <h5><strong>Last Voucher Date :</strong> <?php echo date('d-M-Y H:i:s A',strtotime($booking_release_date)); ?></h5><br />
                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                    </table>

                                                                    <div class="col-sm6 no-padding ">

                                                                    </div>
                                                                    <div class="col-sm3 pull-right ">

                                                                    </div>

                                                                </td>

                                                            </tr>
                                                            <br/>



                                                            <tr>
                                                                <td colspan="2">
                                                                    <div class="box-body table-responsive min-hieght250px">
                                                                        <table id="example1" class="table table-bordered table-striped">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th>S.No</th>
                                                                                    <th>Travel Date/Time</th>
                                                                                    <th>Particular</th>
                                                                                    <th>Details</th>
                                                                                    <th>Adult</th>
                                                                                    <th>Child</th>
                                                                                    <th>Infant</th>
                                                                                    <th>Luggage</th>

                                                                                </tr>
                                                                            </thead>

                                                                            <tbody>
                                                                                <tr>
                                                                                    <td>01</td>
                                                                                    <td><?php echo $pickup_date; ?></td>
                                                                                    <td><?php echo $pickup_address; ?></td>
                                                                                    <td><?php echo $vehicle_type; ?></td>
                                                                                    <td center><?php echo $adults; ?></td>
                                                                                    <td center><?php echo $childs; ?></td>
                                                                                    <td center><?php echo $childs; ?></td>
                                                                                    <td center><?php echo $luggage; ?></td>


                                                                                </tr>
                                                                            </tbody>

                                                                        </table>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">
                                                                    <table class="table table-bordered" width="100%" cellpadding="0" cellspacing="0">

                                                                        <tr>
                                                                            <td class="tdclass1">
                                                                                <div class="col-sm-6 no-padding vertical-align-top">
                                                                                    <div class="col-sm-4">Pickup Address </div><div class="col-sm-8">:  <?php echo $pickup_address ?></div>
                                                                                    <br><br>
                                                                                    <div class="col-sm-4">Pickup Date</div> <div class="col-sm-8">:  <?php echo $pickup_date; ?></div>
                                                                                    <div class="col-sm-4">Pickup Time</div> <div class="col-sm-8">: &nbsp;<?php echo $pickup_time; ?></div>
<!--                                                                                    <div class="col-sm-4">Package</div> <div class="col-sm-8">: <?php //echo $local_pkg_name ?></div>-->
                                                                                    <!--<div class="col-sm-4">No of Days</div> <div class="col-sm-8">: <?php echo $estimated_time ?></div>-->

                                                                                </div>



                                                                                <div class="col-sm-6 no-padding pull-right new1" >

                                                                                    <div class="col-sm-4">Drop Address </div><div class="col-sm-6">: <?php echo $pickup_address; ?></div>
                                                                                    <div class="col-sm-4">Expected Time</div><div class="col-sm-6">: <?php echo $estimated_time ?></div>
                                                                                    <div class="col-sm-4">Expected Distance</div><div class="col-sm-6">&nbsp;<?php //echo $distance  ?></div>                                                    <div class="col-sm-4">Extra Km </div> :<div class="col-sm-6"><?php echo $per_km_price ?></div><br />
                                <!--                                                    <strong>Days:</strong> <?php //echo $estimated_time  ?><br />-->

                                                                                </div>
                                                                            </td>


                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <!--<tr>
                                                                <td class="widthpersent100 vertical-align-top" colspan="2">

                                                                    <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                                                        <tr><td></td></tr>
                                                                        <tr>
                                                                           <td>
                                                                                <div class="col-sm-12 no-padding center new1" >
                                                                                    <strong>Last Cancellation Date :</strong> <?php echo date('d-M-Y H:i:s A'); ?>
                                                                                </div>
                                                                            </td>

                                                                        </tr>





                                                                    </table>

                                                                </td>

                                                            </tr>-->

                                                        </table>
                                                    </td>
                                                </tr>


                                                </td>
                                                </tr>
                                            </table>


                                        </div>
                                    </div>
                                </div>


                            </div>
                            <br/>

                            <div class="panel panel-default">
                                <div>
                                    <h4 class="panel-title">
                                        <div class="row margin10px" >
                                            <div class="mapcantiner_inner1 no-padding">
                                                <div class="col-sm-12 no-padding">

                                                    <div class="destinations-grid-info bgnone padding-left0 ">
                                                        <div class="mapcantiner_inner1 no-padding">
                                                            <div class="margin-bot10px padding-bot10px">
                                                                <div class="col-md-31 overviueimg5 padding-left0" align="left">
                                                                    <h4><strong>Traveller Details</strong></h4>
                                                                </div>


                                                            </div>
                                                        </div>
                                                    </div>


                                                    <div class="form-group traveler_space">
                                                        <div class="col-sm-6 traveler_space">
                                                              <div class="col-sm-4">  First Name</div><div class="col-sm-8">:  <?php echo $client_first_name; ?></div>
                                                        </div>

                                                        <div class="col-sm-6 traveler_space">
                                                        <div class="col-sm-4">  Last Name</div><div class="col-sm-8">:  <?php echo $client_last_name; ?></div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group ">
                                                        <div class="col-sm-6 traveler_space">
                                                            <div class="col-sm-4">Nationality</div><div class="col-sm-8">:  <?php //echo $nationality; ?></div>
                                                        </div>

                                                       <div class="col-sm-6 traveler_space">
                                                         <div class="col-sm-4">Mobile</div><div class="col-sm-8">:  <?php  echo $client_mobile; ?></div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <div class="col-sm-6 traveler_space">
                                                         <div class="col-sm-4">Alt Mobile No</div><div class="col-sm-8">:  <?php  //echo $client_mobile; ?></div>

                                                        </div>

                                                        <div class="col-sm-6 traveler_space">
                                                        <div class="col-sm-4">Email</div><div class="col-sm-8">:  <?php  echo $client_email; ?></div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group col-sm-12 no-padding">
                                                        <div class="col-sm-6 traveler_space">
                                                         <div class="col-sm-4"> Agent Reference </div><div class="col-sm-8">:  <?php  //echo $client_mobile; ?></div>

                                                        </div>
                                                        <div class="col-sm-6 traveler_space">
                                                         <div class="col-sm-4"> GST No. </div><div class="col-sm-8">:  <?php  //echo $client_mobile; ?></div>

                                                        </div>
                                                    </div>


                                                </div>
                                            </div>
                                        </div>
                                    </h4>
                                </div>
                            </div>

                            <br/>
                            <div class="panel panel-default">
                                <div class="destinations-grid-info bgnone padding-left0 ">
                                    <div class="mapcantiner_inner1 no-padding">

                                        <div class="row">
                                            <div class="col-sm-12">
<?php //echo $this->partial('local-hire/index/fare-rules?id=1');  ?>
                                                <h4><strong>Fare Rule</strong></h4>
                                                <div>
                                                    <p>
                                                    <ul style="list-style:circle; margin-left:10px;">
                                                        <li>Approx Distance  <strong><?php echo $estimated_distance; ?></strong> ( As Per Quote)</li>
                                                        <li>Minimum Charged Distance <strong><?php echo $base_fare; ?></strong> ( As per Min Distance )</li>
                                                        <li>Per Km Rates  <strong><?php echo $per_km_price; ?></strong> ( As Per Per Km Rates )</li>
                                                        <?php if (isset($per_hr_charge) && $per_hr_charge != "") { ?>
                                                            <li>Per Hour Rates <strong><?php echo $per_hr_charge; ?></strong> ( As Per Per Hrs Rates )</li>
<?php } ?>
                                                        <li>Driver Allowance <strong><?php echo $night_charge_price; ?></strong> ( Per Day)</li>
                                                    </ul></p>
                                                    <strong>Extra Charges  :- </strong>
                                                    <!--Distance :- If you use Vehicle more than the Estimated Km (<strong><?php echo $data['min_distance']; ?></strong>) Per Km Rates will be Applicable.<br/>-->
                                                    Distance :- If you use Vehicle more than the Estimated Km (<strong><?php echo $estimated_distance ; ?></strong>)  (<i class="fa fa-inr"></i> <?php echo $per_km_price; ?>) Per Extra Km Rates <?php if (isset($per_hr_charge) && $per_hr_charge!= "") { ?> & RS <?php echo $per_hr_charge; ?> Per Extra Hrs <?php } ?> will be Charged.<br/>
                                                    Time     :- If you drop the Vehicle after 2000 Hrs extra Driver Allowance will be Applicable<br/>
                                                    <strong>Note :- </strong>
                                                    <ul style="list-style:circle; margin-left:10px;">
                                                        <li>One Day Means One Calendar day from Midnight ( <?php echo $night_rate_begins; ?> Midnight to <?php echo $night_rate_ends; ?> Mid Night).</li>
                                                        <li>Kilometers ( Km) and Hours will be Calculated from Garage to Garage or Specified</li>
                                                        <li>Air Con will be switch off in Hill Areas</li>
                                                        <li>If Driver Drive Vehicle between <?php echo $night_rate_begins; ?> to <?php echo $night_rate_ends; ?> , Driver Allowance / Night Charges <strong><?php echo $night_charge_price; ?></strong> will be Applicable</li>
                                                    </ul>
                                                    <strong>Inclusions & Exclusions</strong><br/>
                                                    <strong>Inclusions</strong>
                                                    <ul style="list-style:circle; margin-left:10px;">
                                                        <li>Distance <strong>Package <?php echo $estimated_distance ; ?></strong> Km for the exact Itinerary listed above </li>
                                                        <li>No Route Deviation allowed Unless Listed in Itinerary </li>
                                                        <li>GST</li>
                                                        <li>If Driver Drive Vehicle between <?php echo $night_rate_begins; ?> to <?php echo $night_rate_ends; ?> , Driver Allowance / Night Charges <strong><?php echo $night_charge_price; ?></strong> will be Applicable</li>
                                                    </ul>
                                                    <strong>Exclusion</strong>
                                                    <ul style="list-style:circle; margin-left:10px;">
                                                        <li>Toll Taxes ( As Per Actual)</li>
                                                        <li>Parking ( As Per Actual) </li>
                                                        <li>Night Pickup Allowance excluded</li>
                                                        <li>Night Drop off Allowance excluded</li>
                                                        <li>Peak Charges & Waiting Charges as per Tariff</li>
                                                        <li>Driver Allowance (Night Charges) Applicable is the Vehicle</li>
                                                    </ul>
<?php //echo $data; ?>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <br/>
                            <?php
                                $cancellation_rule = json_decode($cancellation_rule, true);
                                if (count($cancellation_rule) > 0) {
                            ?>
                            <div class="panel panel-default">
                                <div class="destinations-grid-info bgnone padding-left0 ">
                                    <div class="mapcantiner_inner1 no-padding">

                                        <div class="row">
                                            <div class="col-sm-12">
                                                <h4><strong>Cancellation Rule</strong></h4>
                                                <div style="height:auto;width:100%;">
                                                    <table class="table table-bordered">

                                                        
                                                            <?php foreach ($cancellation_rule as $key => $value) { ?>
                                                                <tr>
                                                                    <td><?php echo $value['name']; ?></td>
                                                                    <td><?php echo $value['cancellation_value']; ?> (<?php echo $value['cancellation_type']; ?>) </td>
                                                            <?php } ?>
                                                            </tr>

                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                            <br/>
                            <div class="panel panel-default">
                                <div class="destinations-grid-info bgnone padding-left0 ">
                                    <div class="mapcantiner_inner1 no-padding">
<h4><strong>Remark</strong></h4>
                                        <div class="row">
                                            <div class="col-md-12">
                                                <?php echo $remark; ?>
                                            </div>
                                        </div>
                                        </div>
                                        </div>
                            </div>
                            <br/>

                            <div class="col-md-12 no-padding sightmargin pull-left">
                                  
                                       <div class="col-sm-2"><a href="<?php echo $this->url('airport-transfer', array('action' => 'checkout'), array('query' => array('status' => 'hold'))); ?>"><input name="hold_booking" id="hold-booking" class="btn btn-primary btn-lg" value="Pay online" type="button"></a></div>
                                <div class="col-sm-2"> <a href="#"><input name="voucher"  class="btn btn-primary btn-lg" value="Voucher" type="button"></a></div>
                                    
                            </div>



                        </div>
                        <!--Customise div-->
                    </div>
                    <?php echo $this->partial('local-hire/index/payment-detail-traveller'); ?>
                    <div class="clearfix"> </div>
                </div>


            </div>
        </div>
    </div>
</section>
