<?php //Zend\Debug\Debug::dump($taxFare); ?>
<table id="myTable" class="table table-bordered table-striped">
    <thead>
        <tr role="">
            <!--<th><input type="checkbox" class="selectall">All</th>-->
            <th>S.No</th>
            <th>Booking Type</th>
            <th>Company Share</th>
            <th>Partner Share</th>
            <th>Driver Share</th>          
            <th>Created By</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <?php
        if($shareFareDetails!=""){
        if (count($shareFareDetails) > 0) {
            $i = 1;
            foreach ($shareFareDetails as $listing) {
                $userName   =   $this->mainMenu()->fetchUserName($listing['created_by']);
                $bookingType   =   $this->mainMenu()->fetchMasterPackaage($listing['booking_type']);
                if($listing['company_share_type']==1){
                    $companyShareType ='%';
                }else {
                    $companyShareType ='Rs';
                }
                if($listing['partner_share_type']==1){
                    $partnerShareType ='%';
                }else {
                    $partnerShareType ='Rs';
                }
                if($listing['driver_share_type']==1){
                    $driverShareType ='%';
                }else {
                    $driverShareType ='Rs';
                }
                ?>
                <tr>
                    <!--<td class="sorting_1"><input type="checkbox" class="check" rel="<?php echo $listing['id']; ?>"></td>-->
                    <td><?php echo $i; ?></td>
                    <td><?php if(isset($bookingType) && $bookingType!="") echo $bookingType; else echo "NA"; ?></td>
                    <td><?php echo $listing['company_share_value'].' '.$companyShareType; ?></td>
                    <td><?php echo $listing['partner_share_value'].' '.$partnerShareType; ?></td>
                    <td><?php echo $listing['driver_share_value'].' '.$driverShareType; ?></td>
                    <td><?php echo $userName; ?></td>
                   <td><div id="changestatus1" class="<?php if($listing['status']==1){ echo "aprovestatus";}else{ echo "unaprovestatus";} ?> iconsize" name="ChangeStatus" onclick="changeRecordStatus('<?php echo $listing['id']; ?>','setting','change-share-record-status','<?php echo $listing['status'];?>')"> </div></td>
                    <td>
                        <div class="hidden-sm hidden-xs action-buttons"> <!--<a class="blue" href="#"> <i class="ace-icon fa fa-search-plus bigger-130"></i> </a>-->
                            <a href="<?php echo $this->url('setting', array('action' => 'add-price-share'), array('query' => array('id' => $listing['id']))); ?>" class="red pointer edit-form" title="Edit" rel="<?php echo $listing['id']; ?>"> <i class="ace-icon fa fa-edit bigger-130"></i> </a>
                            <a class="red" href="<?php echo $this->url('setting', array('action' => 'delete-share-detail'), array('query' => array('data' => $listing['id']))); ?>" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
                            </div>
                    </td>
                </tr>
                <?php
                $i++;
            }
        } }else {
            ?>
            <tr>
                <td colspan="12" style="text-align: center;">No Records Found</td>
            </tr>
<?php } ?>
    </tbody>
</table>
