	 <link href="<?php echo base_url(); ?>assets/select/chosen.min.css" rel="stylesheet" media="screen">
	
		   
		   		   <script src="<?php echo base_url(); ?>assets/select/chosen.jquery.min.js"></script>

				   
	
        <script>
        $(function() {
<!--             $(".datepicker").datepicker(); -->
<!--             $(".uniform_on").uniform() -->;
            $(".chzn-select").chosen();
   <!--          $('.textarea').wysihtml5(); -->

        });
        </script>
                 
			 
			 

<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#list" data-toggle="tab"><i class="entypo-menu"></i> 
					Refund Deposite for this Bookings 
                    	</a></li>
						<li>
            									 <a href="<?php echo base_url(); ?>admin/viewpallmyplots">Back Home </a>


							</li>
			
		</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
            <!----TABLE LISTING STARTS-->
            <div class="tab-pane box active" id="list">
				
     





		
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" >
            		<i class="entypo-plus-circled"></i>
					Refund Deposite for this Bookings 
            	</div>
            </div>
			<div class="panel-body">





				<?PHP
				echo $this->session->flashdata('msg'); 
		     $mydate = Date('Y-m-d') ;

                 echo form_open('addrefund' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
			
  <div class="form-group">
    <label for="inputamount" class="col-sm-2 control-label">Amount to Refund </label>
    <div class="col-sm-7">
				<input type="text" name="amount" value="<?php echo set_value('amount'); ?>" id="idno" class="form-control" required placeholder="Enter amount to refund">
        <span class="text-danger"><?php echo form_error('amount'); ?></span>
	</div>
  </div>
				
  
  
    
  <div class="form-group">
    <label for="inputmode" class="col-sm-2 control-label">Mode of payment</label>
    <div class="col-sm-7">
				<input type="text" name="mode" value="<?php echo set_value('mode'); ?>" id="idno" class="form-control" required placeholder="Enter mode of payment if any">
        <span class="text-danger"><?php echo form_error('mode'); ?></span>
	</div>
  </div>
				
  
  
    <div class="form-group">
    <label for="inputreceiptno" class="col-sm-2 control-label">Receipt No</label>
    <div class="col-sm-7">
				<input type="text" name="receiptno" value="<?php echo set_value('receiptno'); ?>" id="idno" class="form-control" required placeholder="Enter receipt no if any">
        <span class="text-danger"><?php echo form_error('receiptno'); ?></span>
	</div>
  </div>	

  <div class="form-group">
    <label for="inputtransactioncode" class="col-sm-2 control-label">Transaction Code</label>
    <div class="col-sm-7">
				<input type="text" name="transactioncode" value="<?php echo set_value('transactioncode'); ?>" id="transactioncode" class="form-control" required placeholder="Enter Transaction if any">
        <span class="text-danger"><?php echo form_error('transactioncode'); ?></span>
	</div>
  </div>
			  
  <div class="form-group">
  		<input type="hidden" name="action" value="<?php echo set_value('action','insert'); ?>"id="action" class="form-control" required >

		<input type="hidden" name="bookingid" value="<?php echo set_value('id',$booking[0]['id']); ?>"id="bookingid" class="form-control" required placeholder="Enter booking bookingid">
		<input type="hidden" name="deposite" value="<?php echo set_value('deposite',$booking[0]['deposite']); ?>"id="bookingid" class="form-control" required placeholder="Enter booking bookingid">




    <label for="inputhouseno" class="col-sm-2 control-label">Room Number</label>
    <div class="col-sm-7">
		<input type="text" readonly name="houseno" value="<?php echo set_value('houseno',$booking[0]['houseno']); ?>"id="bookingno" class="form-control" required placeholder="Enter booking number">


     <span class="text-danger"><?php echo form_error('houseno'); ?></span>
   </div>
  </div>
  <div class="form-group">

    <label for="inputplotno" class="col-sm-2 control-label">House Number</label>
    <div class="col-sm-7">
			  		<input type="text" readonly name="plotno" value="<?php echo set_value('plotno',$booking[0]['plotno']); ?>" id="bookingno" class="form-control" required placeholder="Enter booking number">


     <span class="text-danger"><?php echo form_error('plotno'); ?></span>
   </div>
  </div>



  
  
  
    <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">Customer Name</label>
    <div class="col-sm-7">
				    	
			  	<select name="tenantid"  class="chzn-select" required>
<option value="" >---Select Customer for allocation---</option>

		<?php 


	$tenantid=$booking[0]['tenantid'];
		   $tenants = $this->accomodationmodel->gettenantbyid($tenantid);
								


if(is_array($tenants)) {

   foreach($tenants as $tenantsrow){
	     $names= $tenantsrow->lastname. "  ".$tenantsrow->firstname ; 
	   ?>
	    <option  selected="selected" value="<?php echo set_value('tenant',$tenantsrow->id); ?> "><?=$tenantsrow->lastname." ".$tenantsrow->firstname." IDNO ".$tenantsrow->idno;?></option>

					<?php

 
    

}} else {
    


						

} 


if(is_array($tenant)) {

   foreach($tenant as $tenantrow){

    ?>
	    <option value="<?php echo set_value('tenant',$tenantrow->id); ?> "><?=$tenantrow->lastname." ".$tenantrow->firstname." IDNO ".$tenantrow->idno;;?></option>

   
    <?php

}} else {
    echo 'There is no other  tenant for this house.... Please add tenant first.';
}

?>
	</select>
				

	  <span class="text-danger"><?php echo form_error('tenantid'); ?></span>
	</div>
  </div>
  

  
			
  
  
   <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">Payment Date</label>
    <div class="col-sm-7">
				<input type="text" name="entrydate" value="<?php echo set_value('entrydate',$mydate); ?>" id="idno" class="form-control" required placeholder="Enter Start Date">
        <span class="text-danger"><?php echo form_error('entrydate'); ?></span>
	</div>
  </div>
					
  
  	
   <div class="form-group">
    <label for="inputphone3" class="col-sm-2 control-label">Description </label>
    <div class="col-sm-7">
	<textarea name="description" id="ttt" rows="5" placeholder="add Description" class="form-control"><?php echo $booking[0]['description']; ?></textarea>
    <span class="text-danger"><?php echo form_error('description'); ?></span>
   </div>
  </div>
    
  
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
     
	       <button type="submit" name="btn_addrefund" value="refund" class="btn btn-primary">Refund Now </button>

    </div>
  </div>
                    
                <?php echo form_close();?>
            </div>
        </div>
    </div>
</div>


   </div>
</div>




			