<?php $__env->startSection('content'); ?>
<div class="content" id="content">

  <div class="overlay"></div>     
  
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  
  <!-- main content -->
  <div class="main-content">

<?php if(Session::has('error')): ?>
<div class="alert bg-danger text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>

<?php if(Session::has('success')): ?>
<div class="alert bg-success text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>



<!-- panel -->
        <div class="panel panel-piluku panel-users">
          <div class="panel-heading">
            <h3 class="panel-title">
              Rate Management
              <span class="panel-options">
                <a href="#" class="panel-refresh">
                  <i class="icon ti-reload"></i> 
                </a>
                <a href="#" class="panel-minimize">
                  <i class="icon ti-angle-up"></i> 
                </a>
                <a href="#" class="panel-close">
                  <i class="icon ti-close"></i> 
                </a>
              </span>
            </h3>
          </div>
          <div class="panel-body nopadding">
            <div class="table-responsive">
              <table class="table table-hover" style="padding:0px; font-size:10px; color:#000; font-color:#000;">
                <thead>
                  <tr>
                            <th>Rate Date</th>
                            <th>Single</th>
                            <th>Double</th>
                            <th>Triple</th>
                            <th>Child</th>
                            <th>Rooms</th>
                            <th>Min Stay</th>
                            <th>Margin(%)</th>
              
                    <th>&nbsp;</th>
                  
                  </tr>
                </thead>
                 <tbody>
                  <?php foreach($rates as $rate): ?>
                 
                  <tr class="table-row">
                            <input type="rateid" hidden name="single" required="required" value="<?php echo $rate->id; ?>" />
                            <td class="col-sm-1"><?php echo $rate->rate_date; ?></td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="single" required="required" value="<?php echo $rate->single; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="double" required="required" value="<?php echo $rate->double; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="triple" required="required" value="<?php echo $rate->triple; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="child" required="required" value="<?php echo $rate->child; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="rooms" required="required" value="<?php echo $rate->rooms; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="minstay" required="required" value="<?php echo $rate->min_stay; ?>" />
                            </td>
                            <td style="padding:0px;">
                            <input type="number" class="col-sm-8" name="margin" required="required" value="<?php echo $rate->margin; ?>" />
                            </td>
                    <td>

                     <a href="<?php echo URL('admin/hotels/rooms/rates/edit/'); ?>/<?php echo $rate->rate_code; ?>"class="btn btn-green"><i class="ion ion-refresh"></i></a>
                    </td>
                      
                  </tr>
              
                  <?php endforeach; ?>
                  </tbody>
              </table>
            </div>
          </div>
        </div>
        <!-- /panel -->



</div>
<!-- /main content -->   
<script type="text/javascript">
    $(function() {
               $("#startdate").datepicker({ dateFormat: "dd-mm-yy" }).val()
               $("#enddate").datepicker({ dateFormat: "dd-mm-yy" }).val()
       });   
</script>
  
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>