<tr class="remove" >
    <td colspan="20">
        <h5 class="h4text" style="background: #E2E2E2;padding:7px;margin: 0; font-weight: bold;">Vehicle Fare Details</h5>
        <table class="table table-bordered table-striped table-responsive left">            
            <tbody>
                 <thead>
                     <tr>
                        <th>S.NO</th>
                        <th>Vehicle</th>
                        <th>Vehicle No</th>
                        <th>Fuel Type</th>
                        <th>Model</th>
                        <th>Color</th>
                        <th>Price/KM</th>
                        <th>Beyond/KM</th>
                        <th>Charges/Min</th>
                        <th>Action</th>
                    </tr>
                </thead>
                
                <?php if(!empty($vehicleListFareData)) { 
                    //echo "<pre>";                    print_r($vehicleListFareData); die;
                             $i=1;
                    foreach($vehicleListFareData as $fare) {
                         $userName = $this->mainMenu()->fetchUserName($fare['created_by']);
                         $vendorFare = $this->mainMenu()->fetchVendorFare($fare['vehicle_type_id'],$fare['vehicle_master_id']);
                          //echo "<pre>";                    print_r($vendorFare); die;
                          if(!empty($vendorFare)){
                              $fareData = $this->mainMenu()->fetchFareData($baseVehicleId, $tableMode);
                                $cabfareArr['fare_data'] = isset($fareData[0]) ? $fareData[0] : '';
                                 $fareData = $cabfareArr['fare_data'];
                          }else{
                              $fareData = $cabfareArr['fare_data'];
                          }
                         
                    $minimum_charge=0;
                    $minimum_distance=0;
                    $per_km_charge=0;
                    $minimum_hrs=0;
                    if(!empty($fareData)){
                        $minimum_charge   = (isset($fareData['minimum_charge']))?$fareData['minimum_charge']:'0';
                        $minimum_distance = (isset($fareData['minimum_distance']))?$fareData['minimum_distance']:'0';
                        $per_km_charge    = (isset($fareData['per_km_charge']))?$fareData['per_km_charge']:'0'; 
                        $minimum_hrs      = (isset($fareData['minimum_hrs']))?$fareData['minimum_hrs']:'0'; 
                        if($masterPackageModeId==2){
                         $per_km_charge     = (isset($fareData['per_hr_charge']))?$fareData['per_hr_charge']:'0'; 
                        }
                    }
                            ?>
                
                <tr>
                            <td><?php echo $i;?></td>
                            <td><?php echo $fare['vehicle_model_name']; ?></td>
                            <td><?php echo $fare['vehicle_no']; ?></td>
                            <td><?php echo $fare['ignition_type_name']; ?></td>                           
                            <td><?php echo $fare['model'] ?></td>
                            <td><?php echo $fare['colour_name'] ?></td>
                            <td><?php echo $minimum_charge;?>/<?php echo $per_km_charge; ?>KM</td>
                            <td><?php echo $minimum_distance; ?>/KM</td>
                            <td><?php echo $minimum_hrs; ?>/Hours</td>
                            <?php if(!empty($vendorFare)){ ?>
                            <td>
                        <a href="<?php echo $this->url().'/add-fare/'.$baseVehicleId; ?>" style="color:#333; font-size:18px;" title='Edit Fare'>
                            <i class="fa fa-edit" style="height:20px;"></i>
                        </a>
                        <a target="_blank" href="<?php echo $this->url().'/view-vendor-fare/'.$baseVehicleId; ?>" style="color:#333; font-size:18px;" title='View Fare'>
                            <i class="fa fa-eye"></i>
                        </a>

                    </td>
                            <?php } else { ?>
                    <td><a href="#" class='add_vendor_fare' style="color:#333; font-size:18px;" title='Add Fare' rel="<?php echo $baseCombinationId;?>" vehicleMasterId='<?php echo  $fare['vehicle_master_id'];?>'>
                            Select
                        </a></td>
                            <?php } ?>
                        </tr>
                         <?php $i++;} } else {?>
                         <tr><td colspan="9" class="red">No Record Found</td></tr>
                         <?php } ?>
            </tbody>
        </table>
       
    </td>
</tr>