<?php
$i = 1;
if (count($vehicleList) > 0) {
    foreach ($vehicleList as $val) {
        ?>
        <div id="accordion" class="panel-group">
            <div class="panel panel-default">
                <div>
                    <h4 class="panel-title">
                        <div style="margin-top:20px;" >
                            <div style="padding:0 !important;" class="mapcantiner_inner1">
                                <div style="margin:0 0 0; padding:0 0 0;" class="">
                                    <div align="center" class="col-md-2 overviueimgcar border-rignt-carlisst"> <span class="image_box padding_margin0"> <img src="/<?php echo $val['vehicle_image']; ?>"></span> <br>
                                        <p style="font-size:12px;"> <?php echo $val['vehicle_type']; ?> </p></div>
                                    <div class="col-sm-10">

                                    <div align="left" class="col-md-4 iocn-no-padding">
                                        <div class="amenities">
                                            <ul>
                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_pertion"></i><br>
                                                    <br>
                                                    <?php echo $val['seating_capacity']; ?></li>
                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_lagguge"></i><br>
                                                    <br>
                                                    <?php echo $val['luggage']; ?></li>
                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><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 echo $data['items'][0]['pickup_city']; ?></span><br>
                                        <span class="vehicle_name"><?php echo $data['items'][0]['pickup_date']; ?>/ <?php echo $data['items'][0]['pickup_time']; ?></span> </div>
                                        <?php $lastItem    =   count($data['items'])-1;?>
                                    <div align="left" class="col-md-31 overviueimg2"> <span class="vehicle_name"><?php echo $data['items'][$lastItem]['drop_city']; ?></span><br>
                                        <span class="vehicle_name"><?php echo $data['items'][$lastItem]['drop_date']; ?>/ <?php echo $data['items'][$lastItem]['drop_time']; ?></span> </div>

                                    <div align="left" style="line-height:" class="col-md-2 padding_margin0"> <span class="vehicle_name"><?php echo isset($data['items'][0]['duration'])?$data['items'][0]['duration']:''; ?> | <?php echo $data['distance'];?> KM</span><br>
                                        <div style="float:left;" class="vehicle_name"  >&#x20b9;<?php echo $val['total_price']; ?> </div><br>
                                        <div id="item_3" class="pull-left pointer tooltip">
                                            Fare Details
                                            <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"><i class="fa fa-inr"></i> <?php echo $val['base_fare']; ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Per KM Price</td>
                                                        <td align="right"><i class="fa fa-inr"></i> <?php echo $val['per_km_price']; ?></td>
                                                    </tr>

                                                    <tr>
                                                        <td>Distance</td>
                                                        <td align="right"><?php echo $val['min_distance']; ?> KM</td>
                                                    </tr>

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

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

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

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

                                                    <tr>
                                                        <td>Service Tax (<?php echo $val['tax_percentage']; ?>%)</td>
                                                        <td align="right"><i class="fa fa-inr"></i> <?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"><i class="fa fa-inr"></i> <?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 car_select_but" align="center">
                                        <div class="pull-right padding8px">
                                            <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>
                                    </div>

                                    </div>

                                     <div class="col-sm-10 border-top-carlist"  style="margin-bottom:10px !important; background:none !important;padding:0;">
                                                <div class="mapcantiner_inner1" style="padding:0 !important;">
                                                    <div class="" style="margin:0 0 10px; padding:0 0 10px;">
                                                        <div class="col-md-3 margin-bot5px  overviueimg2car1 icon_fair" align="left"> <a href="<?php echo $this->url('outstation', 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('outstation', 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('outstation', 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('outstation', 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 style="width:100%; float:left; border-top:1px dotted #ccc;" align="center"><a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>"><img src="/images/down_arrow.png" style="width:30px; margin-top: -16px;"></a></div>

                                <div class="clearfix"> </div>
                                <div id="collapse-<?php echo $i; ?>" class="panel-collapse collapse">
                                    <div >
                                        <div style="margin-top:20px;" >

                                            <?php
                                            //echo '<pre>';print_r($data['items']);die();
                                            foreach ($data['items'] as $items) {

                                            ?>

                                            <div style="padding:0 !important;" class="mapcantiner_inner1">
                                                <div style="margin:0 0 10px; padding:0 0 10px;" class="testimonial_box">
                                                    <div align="center" class="col-md-2 overviueimgcar"> <span class="image_box padding_margin0"> <img src="/<?php echo $val['vehicle_image']; ?>"></span> <br>
                                                        <p style="font-size:12px;"> <?php echo $val['vehicle_type']; ?> </p></div>
                                                    <div align="left" class="col-md-2 sightmargin padding_margin0">
                                                        <div class="amenities">
                                                            <ul>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_pertion"></i><br>
                                                                    <br>
                                                                    <?php echo $val['seating_capacity']; ?></li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_lagguge"></i><br>
                                                                    <br>
                                                                    <?php echo $val['luggage']; ?></li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_ac"></i><br>
                                                                    <br>
                                                                    <?php echo $val['vehicle_ignition_type']; ?></li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                    <div align="left" class="col-md-31 sightmargin overviueimg2car1"> <span class="vehicle_name"><?php echo $items['pickup_city'] ?></span><br>
                                                        <span class="vehicle_name"><?php echo $items['pickup_date'] ?> <?php echo $items['pickup_time'] ?></span> </div>

                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0"><br>
                                                        <span class="vehicle_name"><?php echo isset($items['duration'])?$items['duration']:''; ?> | <?php echo $items['distance'] ?> KM</span><br>
                                                    </div>

                                                    <div align="left" class="col-md-31 sightmargin overviueimg2"> <span class="vehicle_name"><?php echo $items['drop_city'] ?></span><br>
                                                        <span class="vehicle_name"><?php echo $items['drop_date']; ?> <?php echo $items['drop_time'] ?></span> </div>

<!--                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0">
                                                        <div style="line-height:18px; font-size:14px; float:left;" class="vehicle_name"  > &#x20b9;1500 </div><br><br>

                                                        <div id="item_3" class="item" style="float:left; cursor:pointer;">
                                                            Fare Details
                                                            <div class="tooltip_description" style="display:none;" title="Item 3 Description">
                                                                <table width="90%" align="center" cellspacing="5" cellpadding="5" style="color:#fff; ">
                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>Per KM Price</td>
                                                                        <td align="right">Rs 7</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Distance</td>
                                                                        <td align="right">50KM</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Tex (14.5%)</td>
                                                                        <td align="right">Rs 100</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Total Fare</td>
                                                                        <td align="right">Rs 500</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </div>
                                                    </div>-->
                                                </div>
                                            </div>

                                            <div class="clearfix"> </div>
                                            <?php }?>
                                            <!--<div style="padding:0 !important;" class="mapcantiner_inner1">
                                                <div style="margin:0 0 10px; padding:0 0 10px;" class="testimonial_box">
                                                    <div align="center" class="col-md-2 sightmargin overviueimgcar"> <span class="image_box padding_margin0"> <img src="/images/vehicle.png"></span> <br>
                                                        <p style="font-size:12px;"> <?php echo $val['vehicle_type']; ?> </p></div>
                                                    <div align="left" class="col-md-2 sightmargin padding_margin0">
                                                        <div class="amenities">
                                                            <ul>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_pertion"></i><br>
                                                                    <br>
                                                                    3</li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_lagguge"></i><br>
                                                                    <br>
                                                                    2</li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_ac"></i><br>
                                                                    <br>
                                                                    AC</li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                    <div align="left" class="col-md-31 sightmargin overviueimg2car1"> <span class="vehicle_name">Agra</span><br>
                                                        <span class="vehicle_name">15/11/2015/ 06:10AM</span> </div>

                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0"><br>
                                                        <span class="vehicle_name">4h 5m | 150 KM</span><br>
                                                    </div>

                                                    <div align="left" class="col-md-31 sightmargin overviueimg2"> <span class="vehicle_name">Jaypur</span><br>
                                                        <span class="vehicle_name">15/11/2015/ 10:10AM</span> </div>

                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0">
                                                        <div style="line-height:18px; font-size:14px; float:left;" class="vehicle_name"  > &#x20b9;1500 </div><br><br>

                                                        <div id="item_3" class="item" style="float:left; cursor:pointer;">
                                                            Fare Details
                                                            <div class="tooltip_description" style="display:none;" title="Item 3 Description">
                                                                <table width="90%" align="center" cellspacing="5" cellpadding="5" style="color:#fff; ">
                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>Per KM Price</td>
                                                                        <td align="right">Rs 7</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Distance</td>
                                                                        <td align="right">50KM</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Tex (14.5%)</td>
                                                                        <td align="right">Rs 100</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Total Fare</td>
                                                                        <td align="right">Rs 500</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

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

                                            <div style="padding:0 !important;" class="mapcantiner_inner1">
                                                <div style="margin:0 0 10px; padding:0 0 10px;" class="testimonial_box">
                                                    <div align="center" class="col-md-2 sightmargin overviueimgcar"> <span class="image_box padding_margin0"> <img src="/images/vehicle.png"></span> <br>
                                                        <p style="font-size:12px;"> <?php echo $val['vehicle_type']; ?> </p></div>
                                                    <div align="left" class="col-md-2 sightmargin padding_margin0">
                                                        <div class="amenities">
                                                            <ul>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_pertion"></i><br>
                                                                    <br>
                                                                    3</li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_lagguge"></i><br>
                                                                    <br>
                                                                    2</li>
                                                                <li style="float:left; line-height:13px;  padding: 0 0 0 5px; text-align:center;"><i class="icon_ac"></i><br>
                                                                    <br>
                                                                    AC</li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                    <div align="left" class="col-md-31 sightmargin overviueimg2car1"> <span class="vehicle_name">Jaypur</span><br>
                                                        <span class="vehicle_name">15/11/2015/ 06:10AM</span> </div>

                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0"><br>
                                                        <span class="vehicle_name">4h 5m | 150 KM</span><br>
                                                    </div>

                                                    <div align="left" class="col-md-31 sightmargin overviueimg2"> <span class="vehicle_name">Delhi</span><br>
                                                        <span class="vehicle_name">15/11/2015/ 10:10AM</span> </div>

                                                    <div align="left" style="line-height:" class="col-md-2 sightmargin padding_margin0">
                                                        <div style="line-height:18px; font-size:14px; float:left;" class="vehicle_name"  > &#x20b9;1500 </div><br><br>

                                                        <div id="item_3" class="item" style="float:left; cursor:pointer;">
                                                            Fare Details
                                                            <div class="tooltip_description" style="display:none;" title="Item 3 Description">
                                                                <table width="90%" align="center" cellspacing="5" cellpadding="5" style="color:#fff; ">
                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>Per KM Price</td>
                                                                        <td align="right">Rs 7</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Distance</td>
                                                                        <td align="right">50KM</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Tex (14.5%)</td>
                                                                        <td align="right">Rs 100</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Total Fare</td>
                                                                        <td align="right">Rs 500</td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td>Base Fare</td>
                                                                        <td align="right">Rs 300</td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

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


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