<?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>Rate Type</th>
            <th>Amount</th>
            <th>Rate Begins</th>          
            <th>Rate Ends</th>          
            <th>From Date</th>
            <th>To Date</th>
            <th>Created By</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <?php
        if($nightFareDetails!=""){
        if (count($nightFareDetails) > 0) {
            $i = 1;
            foreach ($nightFareDetails as $listing) {
                $userName   =   $this->mainMenu()->fetchUserName($listing['created_by']);
                $bookingType   =   $this->mainMenu()->fetchMasterPackaage($listing['booking_type']);
                ?>
                <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['night_rate_type']; ?></td>
                    <td><?php echo $listing['night_rate_value']; ?></td>
                    <td><?php echo $listing['night_rate_begins']; ?></td>
                    <td><?php echo $listing['night_rate_ends']; ?></td>
                    <td><?php echo date('d-m-Y',strtotime($listing['from_date'])); ?></td>
                    <td><?php echo date('d-m-Y',strtotime($listing['to_date'])); ?></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-night-premium-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-premium'), 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-night-fare-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>
