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


    <!-- panel -->

    <div class="panel panel-piluku">
      <div class="panel-heading">
        <h3 class="panel-title">
          Booking Voucher - <?php echo $booking->booking_no; ?>

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




      <div class="panel-body">

          <?php echo Form::open(array('route' => 'insertbookingvoucher', 'id' => 'form-a', 'class' => 'form form-horizontal')); ?>
        <input type="hidden" id="booking_id" value="<?php echo $booking->id; ?>" name="booking_id" class="form-control" data-required="true" >






        <div class="form-group">
            					<label class="col-sm-2 control-label">Voucher #:</label>
					                <div class="col-sm-8">
					                  
					                  <input type="text" class="form-control" readonly required value="<?php echo $booking->booking_no; ?>" name="voucher_no" >
					                </div>

        </div>

        <div class="form-group">
                      <label class="col-sm-2 control-label">Note to Resort:</label>
                          <div class="col-sm-8">
                            
                            <textarea style="width: 100%;" name="note"></textarea>
                          </div>

        </div>










          
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
          <input type="submit" class="btn btn-success" value="Generate">
        </div>
      </div>
    </form>
  </div>
</div>
<!-- /panel -->

<!-- panel -->
        <div class="panel panel-piluku panel-users">
          <div class="panel-heading">
            <h3 class="panel-title">
              Voucher
              <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">
                <thead>
                  <tr>
          
                            <th>Voucher No.</th>
                            <th>Note</th>
                            <th>Status</th>
                            <th>By</th>
                            <th>Created at</th>

                    <th>&nbsp;</th>
      
                  
                  </tr>
                </thead>
                <tbody>
                     <?php foreach($vouchers as $voucher): ?>
                  <tr class="table-row">
                 
                            <td><?php echo $voucher->voucher_no; ?></td>
                            <td><?php echo $voucher->note; ?></td>
                            <td><?php echo $voucher->status; ?></td>
                            <td><?php echo AppHelper::getUser($voucher->user_id); ?></td>
                            <td><?php echo Carbon\Carbon::parse($voucher->updated_at)->format('d-m-Y H:m:i'); ?></td>


                    <td>
                      <a style="background-color: #CC9900;" href="<?php echo URL('/admin/bookings/voucher'); ?>/<?php echo $voucher->id; ?>" class="btn btn-green">Preview</a>
                    </td>

   

                      
                  </tr>
                  <?php endforeach; ?>
                  
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <!-- /panel -->



</div>
<!-- /main content -->        
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>