<?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; ?>



  <!--theme panel-->
    <div class="panel">
      <div class="panel-body">
        <!--form-heading-->
        <div class="form-heading">
          Rate Management - <?php echo $rooms->name; ?>

        </div>

        <!--form-heading-->
        <?php echo Form::open(array('route' => 'insertrate', 'id' => 'form-a', 'class' => 'form')); ?>
          <div class="col-md-4">
          <input type="hidden" id="hotelid" value="<?php echo $rooms->id; ?>" name="roomid" class="form-control" data-required="true" >
            <!--Default Form-->
            <div class="form-group">
              <label class="control-label">Single:</label>
             <input type="number" class="form-control" name="single" required="required" />
            </div>
            <!--Default Form-->
            <div class="form-group">
              <label class="control-label">Double:</label>
              <input type="number" class="form-control" name="double"  required="required" />
            </div>
            <div class="form-group">
              <label class="control-label">Triple:</label>
              <input type="number" class="form-control" name="triple"  required="required" />
            </div>
            <div class="form-group">
              <label class="control-label">Child:</label>
              <input type="number" class="form-control" name="child" required="required" />
            </div>

          </div>

          <div class="col-md-4">
          <!-- xsuccess-->
            <div class="form-group">
              <label class="control-label">Available Rooms:</label>
              <div class="input-group">
                <span class="input-group-addon bg">
                  <i class="ion-plus"></i>
                </span>
                <select name="rooms" class="name_search form-control">
                  <option value="1"> 1 </option>
                  <option value="2"> 2 </option>
                  <option value="3"> 3 </option>
                  <option value="4"> 4 </option>
                  <option value="5"> 5 </option>
                  <option value="6"> 6 </option>
                  <option value="7"> 7 </option>
                </select>
              </div>
              <!-- /input-group -->
            </div>


            <div class="form-group">
              <label class="control-label">Minimum Stay:</label>
              <div class="input-group">
                <span class="input-group-addon bg">
                  <i class="ion-plus"></i>
                </span>
                <select name="minstay" class="name_search form-control">
                  <option value="1"> 1 </option>
                  <option value="2"> 2 </option>
                  <option value="3"> 3 </option>
                  <option value="4"> 4 </option>
                  <option value="5"> 5 </option>
                  <option value="6"> 6 </option>
                  <option value="7"> 7 </option>
                </select>
              </div>
              <!-- /input-group -->
            </div>

            <div class="form-group">
              <label class="control-label">Mirgin:</label>
              <input type="number" name="mirgin"  class="form-control" required="required" />
            </div>
            <div class="form-group">
              <label class="control-label">Rate Code:</label>
              <input type="text" name="ratecode"  class="form-control" >
            </div>

           

          </div>

                    <div class="col-md-4">
                          <div class="picker">


            <!--Default Form-->
            <div class="form-group">
            <label class="control-label">Dates:</label>
                <div class="input-group input-daterange" id="datepicker">
                  <input type="text" class="form-control" data-provide="datepicker" id="datepicker" name="startdate">
                  <span class="input-group-addon bg">
                    to
                  </span>
                  <input type="text" class="form-control" name="enddate" id="datepicker" data-provide="datepicker">
                </div>
            </div>
            <!--Default Form-->


            <!-- xaddress form-->
            <div class="form-group">
              <label class="control-label">Remarks :</label>
              <textarea name="" class="form-control text-area" name="remarks" cols="35" rows="20"></textarea>
            </div>
            <!-- xaddress form-->
                <div class="form-group">
                      <div class="col-sm-offset-2 col-sm-8">
                        <input type="submit" class="btn btn-success">
                        <input type="reset" class="btn btn-danger">
                      </div>
                </div>

          </div>
        </form>
      </div>
    </div>
    <!--theme panel-->

<!-- panel -->
        <div class="panel panel-piluku panel-users">
          <div class="panel-heading">
            <h3 class="panel-title">
              List of Rates
              <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>Start Date</th>
                            <th>End Date</th>
                            <th>Single</th>
                            <th>Double</th>
                            <th>Triple</th>
                            <th>Child</th>
                            <th>Rate Code</th>
              
                    <th>&nbsp;</th>
                  
                  </tr>
                </thead>
                <tbody>
                  <?php foreach($rates as $rate): ?>
                  
                  <tr class="table-row">
                          
                            <td><?php echo $rate->start_date; ?></td>
                            <td><?php echo $rate->end_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="ratecode" required="required" value="<?php echo $rate->rate_code; ?>" />
                            </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-edit"></i></a>
                   
                      <a href="#" class="btn btn-red"><i class="ion ion-ios-trash-outline"></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(); ?>