		
	<script type="text/javascript">


$(window).load(function()
{
	 if( window.print()) {
         window.location.href = "../user/viewdailycollections";
 }else{
	  //       window.location.href = "../user/viewdailycollections";
 
 }
});
</script>	
<script>
	function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

    // document.body.innerHTML = printContents.fontsize(16);
     window.print();

	 if( window.print()) {
         window.location.href = "../user/allinvoices";
		alert(" printing...........");
    }else {

	
		      return      window.location.href = "../user/allinvoices";

		    // document.body.innerHTML = originalContents;

	}
}
	</script>

   <style type="text/css">
  
  

    #printable { display: none; }

    #myprint { display: none; }
#print{  	


    background-repeat: no-repeat;
	font-size;12px;
  
    


}


#sale{  	
background-image:url(images/add.png) ;

    background-repeat: no-repeat;
  
    widtd:100px; height:50px;


}
    
    @media print
    {
    	#non-printable { display: none; }
    	#printableArea { display: block; font-size:16; widtd:100%; }
		    	#myprint { display: block; font-size:16; widtd:100%; }

    }
    </style>




	 <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(tdis).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		
		
		
    </script> 

 
 <div class="row">
  
   	

   	<div class="col-md-12">
	
  
		<div class="panel panel-default" data-collapsed="0" id="non-printable">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
						 <span class="pull-right"> View Gate Pass</span>	
	
 	<div class="print-hide" id="non-printable"  >

<form name="print" method="post" action="">
 
 <div class="row">

 

   	<div class="col-md-6">
				
	
</div>
   	<div class="col-md-6">
<input type="submit" id="print"  accesskey="p" class="btn btn-primary"  name="print"onclick="printDiv('sortable_table')" value="print receipt!" />
                        <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>user/viewgatepass">Back to Gate Pass </a>


</form></div></div>
</div> 
				
            	</div>
            </div>
			
	</div>
		</div>

			
			
			<div class="panel-body">

			
					
									
				<table class="tablesorter table table-bordered  table-hover" id="sortable_table">			

			 <tr>
				 	
	<td colspan="2" width="100%">
	<center>
					
										<?php $bussinessname=$configuration[0]['businessname']; if(isset($bussinessname)) {echo   $bussinessname; }?>
		
		<H2><B> GATE PASS</B></H2>
		
		</center>	
		</td>

			</tr>
			  <tr>
    
     <td>Branch</td>
	     	<td>
			
			<?php  $mybranchid=$collections[0]['branchid'];

$mybranch=$this->usermodel->populateallarray('branch','id', $mybranchid);
$myuser=$this->usermodel->populateallarray('people','id', $collections[0]['receiver']);
$myusername=$myuser[0]['firstname'];
			echo$myname=$mybranch[0]['name'];
			?>
			
			
			</td>

	   </tr>
	   
	       <tr>
    
     <td>REF NO</td>
	     	<td><?php echo $collections[0]['media']; ?></td>

	   </tr>
         <tr>
    
     <td>Date</td>
	     	<td><?php echo $collections[0]['checkindate']; ?></td>

	   </tr>
	   <tr>
	   
	  <td>Name </td>
  	<td><?php echo $collections[0]['description']; ?></td>
	  
	  </tr>
	  
	   <tr>
	   
	  	  <td>ID NO </td>
		  					 <td><?php echo $collections[0]['idno']; ?></td>

		 </tr>
		   <tr>
	   
	  	  <td>Vehicle No</td>
		  					 <td><?php echo $collections[0]['vehicleno']; ?></td>

		 </tr>
	   <tr>
	   
	  	  <td>No of Visitors </td>
		  					 <td><?php echo $collections[0]['subject']; ?></td>

		 </tr>
	   <tr>
	   
		  	  	  <td>Gate </td>
		  					 <td><?php echo $collections[0]['location']; ?></td>

  </tr>
	   
	   <tr>
	   
		      <td>Checked-in by?</td>
			  	   <td><?php echo $myusername; ?></td>

		
	   </tr>
	     <tr>
	   
		      <td colspan="2">
			    <center>
								<img src="<?php echo base_url().'Systemusers/barcode/'.$collections[0]['media']; ?>" alt="">
																	 </center>

	
			  	 
				   
				   </td>

		
	   </tr>
		 
		
                
   
   
		
		
        </table>
</div>	</div>	
			 					
									
									
				

				

			
			</div>
		</div>
  
  </div>
			
			
			
			
			


 
</div>


















