<?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(Entrust::can('payment_vouchers_edit')): ?>
    <!-- panel -->

    <div class="panel panel-piluku">
      <div class="panel-heading">
        <h3 class="panel-title">
          Edit Payment Voucher (<?php echo $payment_voucher->voucher_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' => 'updatepaymentvoucher', 'id' => 'form-a', 'class' => 'form form-horizontal')); ?>

          <input name="voucher_id" type="text" hidden style="display: none" value="<?php echo $payment_voucher->id; ?>" required class="form-control"  />




          <div class="form-group">
            					<label class="col-sm-2 control-label">Name of Payee:</label>
					                <div class="col-sm-8">
					                  
					                  <input type="text" class="form-control" value="<?php echo $payment_voucher->payee; ?>" required name="payee" >
					                </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">Payment Method:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="payment_method" data-validation="required" required data-validation-error-msg="Please make a choice">
              <option value="<?php echo $payment_voucher->payment_method; ?>" selected><?php echo $payment_voucher->payment_method; ?></option>
                <option value="Bank Transfer">Bank Transfer</option>
                <option value="Card">Card</option>
                <option value="Cash">Cash</option>
                <option value="Cheque">Cheque</option>
                <option value="Direct Deposit">Direct Deposit</option>
              </select>
            </div>
          </div>




        <div class="form-group">
            					<label class="col-sm-2 control-label">Account No.:</label>
					                <div class="col-sm-8">
					                  
					                  <input type="text" class="form-control" value="<?php echo $payment_voucher->account_no; ?>" required name="account_no" >
					                </div>
        </div>

        <div class="form-group">
            					<label class="col-sm-2 control-label">Account Name:</label>
					                <div class="col-sm-8">
					                  
					                  <input type="text" class="form-control" required  value="<?php echo $payment_voucher->account_name; ?>" name="account_name" >
					                </div>
        </div>


         <div class="form-group">
            <label class="col-sm-2 control-label">Currency:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="currency" data-validation="required"  required data-validation-error-msg="Please make a choice">
                <option value="<?php echo $payment_voucher->currency; ?>" selected><?php echo $payment_voucher->currency; ?></option>
                <option value="MVR">MVR</option>
                <option value="USD">USD</option>
              </select>
            </div>
          </div>





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


        <div class="form-group">
                      <label class="col-sm-2 control-label">Prepared By:</label>
                          <div class="col-sm-8">
                            
                            <input type="text" class="form-control" required value="<?php echo Auth::user()->name; ?>"  name="voucher_prepared_by" >
                          </div>
        </div>




        <div class="form-group">
                      <label class="col-sm-2 control-label">Checked By:</label>
                          <div class="col-sm-8">
                            
                            <input type="text" class="form-control" required value="<?php echo $payment_voucher->checked_by; ?>" name="voucher_checked_by" >
                          </div>
        </div>

        <div class="form-group">
                      <label class="col-sm-2 control-label">Approved By:</label>
                          <div class="col-sm-8">
                            
                            <input type="text" class="form-control" required value="<?php echo $payment_voucher->approved_by; ?>" name="voucher_approved_by" >
                          </div>
        </div>






          
      <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>
    </form>
  </div>
</div>
<!-- /panel -->
<?php endif; ?>




</div>
<!-- /main content -->        
<?php $__env->stopSection(); ?>


<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>