	
	<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 Daily Collections</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/viewdailycollections">Back to Collections </a>


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

			
			
			<div class="panel-body">

			
					
					<b>				
				<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> CLOSED DAILY SALE</B></H2>
		
		</center>	
		</td>

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

$mybranch=$this->usermodel->populateallarray('branch','id', $mybranchid);


			echo$myname=$mybranch[0]['name'];
			?>
			
			
			</td>

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

	   </tr>
	   <tr>
	   
	  <td>Opening balance </td>
  	<td><?php echo $collections[0]['openingbalance']; ?></td>
	  
	  </tr>
	  
	   <tr>
	   
	  	  <td>Debt Received </td>
		  					 <td><?php echo $collections[0]['debt']; ?></td>

		 </tr>
		   <tr>
	   
	  	  <td>Advance Received </td>
		  					 <td><?php echo $collections[0]['amount']; ?></td>

		 </tr>
	   <tr>
	   
	  	  <td>TT Sales </td>
		  					 <td><?php echo $collections[0]['totalsales']; ?></td>

		 </tr>
	   <tr>
	   
		  	  	  <td>Total </td>
		  					 <td><?php echo $collections[0]['totalsales']+$collections[0]['openingbalance']; ?></td>

  </tr>
	   <tr>
	   
  <td>Cash Sales</td> 
  	 	<td><?php echo $collections[0]['cash']; ?></td>

   </tr>
	   <tr>
	   
	  <td>Mpesa Sales</td> 
	  					 <td><?php echo $collections[0]['mpesa']; ?></td>

	 
	 </tr>
	   <tr>
	   
	 <td>Card Sales</td> 
	 					 <td><?php echo $collections[0]['card']; ?></td>

	  </tr>
	   <tr>
	   
	 	 <td>Cheque Sales</td> 
		 					 <td><?php echo $collections[0]['cheque']; ?></td>

		  </tr>
	   <tr>
	   

	 	 <td>Credit Sales</td> 
		 										 <td><?php echo $collections[0]['credit']; ?></td>

		 </tr>
	   <tr>
		 	 	 <td>Voucher Sales</td> 
				 										 <td><?php echo $collections[0]['voucher']; ?></td>

			 </tr>
	   <tr>
				  <td>TT Expense </td> 
				  				 										 <td><?php echo $collections[0]['expense']; ?></td>

			 </tr>
	   <tr>
	   
				 	  <td>Short </td> 
					  										 <td><?php echo $collections[0]['sortmoney']; ?></td>

		 </tr>
	   <tr>
	   
					  	  <td>Mpes/Bank Expense </td> 
						  													<td><?php echo $collections[0]['tax']; ?></td>

		 </tr>
	   <tr>
	   
						  					  	  <td>Amt Collected </td>
												  													<td><?php echo $collections[0]['cashcollected']; ?></td>

 </tr>
	   <tr>
	   												  

												  	  <td>Closing Balance </td> 
													  													<td><?php echo $collections[0]['closingbalance']; ?></td>

			 </tr>
	   <tr>

		   <td>Name</td>
		   	   <td><?php echo $collections[0]['name']; ?></td>

		  </tr>
	   <tr>
		   	   <td>Description</td>
			   	       <td><?php echo $collections[0]['description']; ?></td>

		 </tr>
	   <tr>
	   
		      <td>Approved by?</td>
			  	   <td><?php echo $collections[0]['controller']; ?></td>

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

				

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


 
</div>


















