<?php
//echo '<pre>';print_r($vehicleList);die();
//echo '<pre>';print_r($data);die();
$i = 1;
if (count($vehicleList) > 0) {
    foreach ($vehicleList as $data1) {
        $dataCount = count($data1);
        $val = $data1[0];
        if ($val['master_package_mode_id'] == 1) {
            $hourlyfare = 'display-none';
            $distancefare = '';
        }
        if ($val['master_package_mode_id'] == 2) {
            $hourlyfare = '';
            $distancefare = 'display-none';
        }
        if ($val['master_package_mode_id'] == 3) {
            $hourlyfare = '';
        }
        if ($val['master_package_mode_id'] == 4) {
            $hourlyfare = 'display-none';
            $distancefare = '';
        }
        ?>
        <div id="accordion" class="panel-group">
            <div class="panel panel-default">
                <div>
                    <h4 class="panel-title">
                        <div class="margin-top20px">
                            <div  class="mapcantiner_inner1 no-padding">
                                <div  class="carlist_box no-padding margin0">
                                    <div align="center" class="col-md-2 border-rignt-carlisst"> <span class="image_box padding0 margin0"> <img src="/<?php echo $val['vehicle_image']; ?>"></span> <br>
                                        <div class="font-siz-14px margin0 vehicle-type"> <?php echo $val['vehicle_type']; ?> </div>
                                        <div class="margin0 vehicle-type tooltip"><?php echo substr(ucwords(strtolower($val['vehicle_name']), ','), 0, 25); ?> ...
                                            <div class="tooltiptext">
                                                <table width="90%" align="center" cellspacing="5" cellpadding="5" class="white">
                                                    <tr>
                                                        <td><?php echo $val['vehicle_name']; ?></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-sm-10">

                                        <div align="left" class="col-md-3 iocn-no-padding">
                                            <div class="amenities">
                                                <ul>
                                                    <li><i class="icon_pertion"></i><br>
                                                        <br>
                                                        <?php echo $val['seating_capacity']; ?></li>
                                                    <li><i class="icon_lagguge"></i><br>
                                                        <br>
                                                        <?php echo $val['luggage']; ?></li>
                                                    <li><i class="icon_ac"></i><br>
                                                        <br>
                                                        <?php echo $val['vehicle_ignition_type']; ?></li>
                                                </ul>
                                            </div>
                                        </div>

                                        <div align="left" class="col-md-31 overviueimg2car1"> <span class="vehicle_name">
                                                <?php
                                                if ($data['airport_transfer'] == 1) {
                                                    echo $data['pickup_area'];
                                                } else {
                                                    echo $data['airport'];
                                                }
                                                ?>

                                            </span><br>
                                            <span class="vehicle_name"><?php echo $data['pickup_date']; ?>/ <?php echo $data['pickup_time']; ?></span> </div>

                                        <div align="left" class="col-md-31 overviueimg2"> <span class="vehicle_name">
                                                <?php
                                                if ($data['airport_transfer'] == 1) {
                                                    echo $data['airport'];
                                                } else {
                                                    echo $data['drop_area'];
                                                }
                                                ?>
                                            </span><br>
                                            <span class="vehicle_name"><?php echo $data['pickup_date']; ?>/ <?php echo $data['drop_time']; ?></span> </div>

                                        <div align="left" class="col-md-3"> <span class="vehicle_name">
                                                <?php echo isset($data['duration']) ? $data['duration'] : 0; ?> |
                                                <?php echo isset($data['distance']) ? $data['distance'] : 0; ?> KM</span><br>
                                            <div id="item_3" class="item pull-left pointer tooltip">
                                                Fare Details <br/>
                                                (<?php echo $val['package_mode']; ?>)

                                                <div class="tooltiptext" title="Item 3 Description">
                                                    <table width="90%" align="center" cellspacing="5" cellpadding="5" class="white">
                                                        <tr>
                                                            <td>Base Fare</td>
                                                            <td align="right"> <?php echo $val['base_fare']; ?></td>
                                                        </tr>
                                                        <tr class="distance-fare <?php echo $distancefare; ?>">
                                                            <td>Distance</td>
                                                            <td align="right"><?php echo $val['min_distance']; ?> KM</td>
                                                        </tr>

                                                        <tr class="distance-fare <?php echo $distancefare; ?>">
                                                            <td>Per KM Price</td>
                                                            <td align="right"> <?php echo $val['per_km_price']; ?></td>
                                                        </tr>
                                                        <tr class="hourly-fare <?php echo $hourlyfare; ?>">
                                                            <td>Hour</td>
                                                            <td align="right"><?php echo (isset($val['min_hour'])) ? $val['min_hour'] : 0; ?> Hrs</td>
                                                        </tr>

                                                        <tr class="hourly-fare <?php echo $hourlyfare; ?>">
                                                            <td>Per Hour Price </td>
                                                            <td align="right"> <?php echo (isset($val['per_hr_charge'])) ? $val['per_hr_charge'] : 0; ?></td>
                                                        </tr>

                                                        <tr>
                                                            <td>Running Amount</td>
                                                            <td align="right"> <?php echo $val['running_amt']; ?></td>
                                                        </tr>

                                                        <tr>
                                                            <td>Peak Time Price</td>
                                                            <td align="right"> <?php echo $val['peak_time_price']; ?></td>
                                                        </tr>

                                                        <tr>
                                                            <td>Night Charges</td>
                                                            <td align="right"> <?php echo $val['night_charge']; ?></td>
                                                        </tr>

                                                        <tr>
                                                            <td>Extras</td>
                                                            <td align="right"> <?php echo $val['extra_charge']; ?></td>
                                                        </tr>

                                                        <tr>
                                                            <td>Tax (<?php echo $val['tax_percentage']; ?>%)</td>
                                                            <td align="right"> <?php echo $val['tax_price']; ?></td>
                                                        </tr>

                                                        <?php if (isset($val['markup_base']) && $val['markup_base'] == 1) { ?>
                                                            <tr>
                                                                <td>Other (<?php echo $val['markup_value']; ?> <?php echo $val['markup_type']; ?>)</td>
                                                                <td align="right"> <?php echo $val['markup_price']; ?></td>
                                                            </tr>
                                                        <?php } ?>

                                                        <tr>
                                                            <td>Payable Amount</td>
                                                            <td align="right"><i class="fa fa-inr"></i> <?php echo $val['total_price']; ?></td>
                                                        </tr>

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

                                        <div class="col-sm-2 col-sm-2-select padding_margin0 margin-left20px " align="center">
                                            <div class="vehicle_name pull-left font-siz-14px"  ><i class="fa fa-inr"></i> <?php echo $val['total_price']; ?></div>
                                            <div class="col-sm-12 padding0 car_select_but <?php if ($i == 1) {
                                                    echo "car_select_active";
                                                } ?>">

                                                <label class="select-car">Select
                                                    <input type="radio" class="vehicle-select" <?php
                                                    if ($i == 1) {
                                                        echo 'checked="checked"';
                                                    }
                                                    ?> name="vehicleid" value="<?php echo $val['base_vehicle_id']; ?>">
                                                    <span class="checkmarkSelect"></span>
                                                </label>

                                            </div>
                                            <?php if ($dataCount > 1) { ?>
                                                <div class="vehicle_name widthpercent100 pull-left"  ><a class="btn btn-more" data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>">more..</a></div>
        <?php } ?>
                                        </div>

                                    </div>

                                    <div class="marginbot10 col-sm-10 no-border no-padding pull-right border-top-carlist">
                                        <div class="mapcantiner_inner1 no-padding">
                                            <div class="marginbot10 padding-bot10px">
                                                <div class="col-md-3 overviueimg2car1 icon_fair" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'fare-rules'), array('query' => array('id' => $val['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name width120">Fare Rules</a> </div>
                                                <!--<div class="col-md-3 overviueimg2car1 icon_bagage" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'feature'), array('query' => array('type' => 'baggage', 'id' => $val['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name">Baggage</a> </div>
                                                <div class="col-md-3 overviueimg2car1 icon_seating" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'feature'), array('query' => array('type' => 'seating-capacity', 'id' => $val['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name width132">Seating Capacity</a> </div>-->
                                                <div class="col-md-3 overviueimg2car1 icon_bagage" align="left"> <a href="#" class="cartypelink vehicle_name">Meeting Point</a> </div>
                                                <div class="col-md-3 overviueimg2car1 icon_seating" align="left"> <a href="#" class="cartypelink vehicle_name width132">Cancellation Policy</a> </div>
                                                <div class="col-md-3 overviueimg2car1 icon_amenities" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'amenities'), array('query' => array('id' => $val['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name">Amenities</a> </div>
                                            </div>
                                        </div>
                                        <div class="clearfix"> </div>
                                    </div>

                                </div>
                                <div class="clearfix"> </div>
        <?php if ($dataCount > 1) { ?>

                                    <div id="collapse-<?php echo $i; ?>" class="panel-collapse collapse">
                                        <div>
                                            <div class="" >
                                                <?php
                                                unset($data1[0]);
                                                foreach ($data1 as $items) {
                                                    if ($items['master_package_mode_id'] == 1) {
                                                        $hourlyfare = 'display-none';
                                                        $distancefare = '';
                                                    }
                                                    if ($items['master_package_mode_id'] == 2) {
                                                        $hourlyfare = '';
                                                        $distancefare = 'display-none';
                                                    }
                                                    if ($items['master_package_mode_id'] == 3) {
                                                        $hourlyfare = '';
                                                        $distancefare = '';
                                                    }
                                                    if ($items['master_package_mode_id'] == 4) {
                                                        $hourlyfare = 'display-none';
                                                        $distancefare = '';
                                                    }
                                                    ?>

                                                    <div  class="carlist_box no-padding margin0 border-top-carlist">
                                                        <div align="center" class="col-md-2 border-rignt-carlisst"> <span class="image_box padding0 margin0"> <img src="/<?php echo $val['vehicle_image']; ?>"></span> <br>
                                                            <p class="font-siz-14px margin0"> <?php echo $items['vehicle_type']; ?> </p>
                                                            <!--<p class="margin0">Dzire, Etios or similar</p>-->
                                                            <div class="margin0 vehicle-type tooltip"><?php echo substr(ucwords(strtolower($items['vehicle_name']), ','), 0, 25); ?> ...
                                                                <div class="tooltiptext">
                                                                    <table width="90%" align="center" cellspacing="5" cellpadding="5" class="white">
                                                                        <tr>
                                                                            <td><?php echo $items['vehicle_name']; ?></td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-10 padding-top10px">

                                                            <div align="left" class="col-md-3 iocn-no-padding">
                                                                <div class="amenities">
                                                                    <ul>
                                                                        <li><i class="icon_pertion"></i><br>
                                                                            <br>
                                                                            <?php echo $items['seating_capacity']; ?></li>
                                                                        <li><i class="icon_lagguge"></i><br>
                                                                            <br>
                                                                            <?php echo $items['luggage']; ?></li>
                                                                        <li><i class="icon_ac"></i><br>
                                                                            <br>
                <?php echo $items['vehicle_ignition_type']; ?></li>
                                                                    </ul>
                                                                </div>
                                                            </div>

                                                            <div align="left" class="col-md-31 overviueimg2car1"> <span class="vehicle_name">
                                                                    <?php
                                                                    if ($data['airport_transfer'] == 1) {
                                                                        echo $data['pickup_area'];
                                                                    } else {
                                                                        echo $data['airport'];
                                                                    }
                                                                    ?>

                                                                </span><br>
                                                                <span class="vehicle_name"><?php echo $data['pickup_date']; ?>/ <?php echo $data['pickup_time']; ?></span> </div>

                                                            <div align="left" class="col-md-31 overviueimg2"> <span class="vehicle_name">
                                                                    <?php
                                                                    if ($data['airport_transfer'] == 1) {
                                                                        echo $data['airport'];
                                                                    } else {
                                                                        echo $data['drop_area'];
                                                                    }
                                                                    ?>
                                                                </span><br>
                                                                <span class="vehicle_name"><?php echo $data['pickup_date']; ?>/ <?php echo $data['drop_time']; ?></span> </div>


                                                            <div align="left" class="col-md-3"> <span class="vehicle_name">
                <?php echo isset($data['duration']) ? $data['duration'] : 0; ?> | <?php echo isset($data['distance']) ? $data['distance'] : 0; ?> KM</span><br>
                                                                <br>
                                                                <div id="item_3" class="pull-left pointer tooltip">
                                                                    Fare Details<br/>
                                                                    (<?php echo $items['package_mode']; ?>)
                                                                    <div class="tooltiptext" title="Item 3 Description">
                                                                        <table width="90%" align="center" cellspacing="5" cellpadding="5" class="white">
                                                                            <tr>
                                                                                <td>Base Fare</td>
                                                                                <td align="right"> <?php echo $items['base_fare']; ?></td>
                                                                            </tr>
                                                                            <tr class="distance-fare <?php echo $distancefare; ?>">
                                                                                <td>Distance</td>
                                                                                <td align="right"><?php echo $items['min_distance']; ?> KM</td>
                                                                            </tr>

                                                                            <tr class="distance-fare <?php echo $distancefare; ?>">
                                                                                <td>Per KM Price</td>
                                                                                <td align="right"> <?php echo $items['per_km_price']; ?></td>
                                                                            </tr>
                                                                            <tr class="hourly-fare <?php echo $hourlyfare; ?>">
                                                                                <td>Hour</td>
                                                                                <td align="right"><?php echo (isset($val['min_hour'])) ? $items['min_hour'] : 0; ?> Hrs</td>
                                                                            </tr>

                                                                            <tr class="hourly-fare <?php echo $hourlyfare; ?>">
                                                                                <td>Per Hour Price </td>
                                                                                <td align="right"> <?php echo (isset($items['per_hr_charge'])) ? $items['per_hr_charge'] : 0; ?></td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td>Running Amount</td>
                                                                                <td align="right"> <?php echo $items['running_amt']; ?></td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td>Peak Time Price</td>
                                                                                <td align="right"> <?php echo $items['peak_time_price']; ?></td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td>Night Charges</td>
                                                                                <td align="right"> <?php echo $items['night_charge']; ?></td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td>Extras</td>
                                                                                <td align="right"> <?php echo $items['extra_charge']; ?></td>
                                                                            </tr>

                                                                            <tr>
                                                                                <td>Tax (<?php echo $items['tax_percentage']; ?>%)</td>
                                                                                <td align="right"> <?php echo $items['tax_price']; ?></td>
                                                                            </tr>
                <?php if (isset($items['markup_base']) && $items['markup_base'] == 1) { ?>
                                                                                <tr>
                                                                                    <td>Other (<?php echo $items['markup_value']; ?> <?php echo $items['markup_type']; ?>)</td>
                                                                                    <td align="right"> <?php echo $items['markup_price']; ?></td>
                                                                                </tr>
                <?php } ?>
                                                                            <tr>
                                                                                <td>Payable Amount</td>
                                                                                <td align="right"><i class="fa fa-inr"></i> <?php echo $items['total_price']; ?></td>
                                                                            </tr>

                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <!--                                    <div align="left" class="col-md-31 sightmargin overviueimg2">
                                                                                                    <input type="hidden" value="11500" name="MinimumCharge">
                                                                                                </div>-->
                                                            <div class="col-sm-2 col-sm-2-select padding_margin0 margin-left20px" align="center">

                                                                <div class="vehicle_name pull-left font-siz-14px"  ><i class="fa fa-inr"></i> <?php echo $items['total_price']; ?> </div>
                                                                <div class="col-sm-12 padding0 car_select_but">

                                                                    <label class="select-car">Select
                                                                        <input type="radio" class="vehicle-select" name="vehicleid" value="<?php echo $items['base_vehicle_id']; ?>">
                                                                        <span class="checkmarkSelect"></span>
                                                                    </label>

                                                                </div>
                                                            </div>

                                                        </div>
                                                        <!--cab-dtail-->

                                                        <div class="no-border other-services col-sm-10 no-padding pull-right border-top-carlist">
                                                            <div class="mapcantiner_inner1 no-padding">
                                                                <div class="marginbot10 padding-bot10px">
                                                                    <div class="col-md-3 overviueimg2car1 icon_fair" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'fare-rules'), array('query' => array('id' => $items['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name width120">Fare Rules</a> </div>
                                                                    <div class="col-md-3 overviueimg2car1 icon_bagage" align="left"> <a href="#" class="cartypelink vehicle_name">Meeting Point</a> </div>
                                                                    <div class="col-md-3 overviueimg2car1 icon_seating" align="left"> <a href="#" class="cartypelink vehicle_name width132">Cancellation Policy</a> </div>
                                                                    <div class="col-md-3 overviueimg2car1 icon_amenities" align="left"> <a href="<?php echo $this->url('airport-transfer', array('action' => 'amenities'), array('query' => array('id' => $items['base_vehicle_id']))); ?>" data-target="#ajax-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="cartypelink vehicle_name">Amenities</a> </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                    </div>

                                                    <div class="clearfix"> </div>




            <?php } ?>

                                            </div>
                                        </div>
                                    </div>
        <?php } ?>
                            </div>
                        </div>
                    </h4>
                </div>
            </div>
        </div>
        <?php
        $i++;
    }
} else {
    ?>
    No Record Found
<?php } ?>