<?php include("sass/header_links_only.php");?>
          
        
      <?php

$invoice_no =$_REQUEST['inv'];
$query_invoice = "SELECT * FROM accounts_expense where id ='$invoice_no'";
                                        $result_invoice = mysqli_query($connection,$query_invoice);
                                        
										
										
                                        while($row_invoice=mysqli_fetch_array($result_invoice))
                                        {
                                        
										
                                        $name = $row_invoice['name'];
										$cash = $row_invoice['cash'];
										$prev_bank = $row_invoice['bank'];
										$bank_id = $row_invoice['bank_id'];
										$cheque_no = $row_invoice['cheque_no'];
										$cheque_date = $row_invoice['cheque_date'];
										$sector = $row_invoice['sector'];
										$description = $row_invoice['description'];
										$date = $row_invoice['date'];
									
										$result_for_cus_name = mysqli_query($connection,"SELECT * FROM bank_statement WHERE ref  = '$invoice_no'");
		$test_for_cus_name = mysqli_fetch_array($result_for_cus_name);
				
				$Stat_bank=$test_for_cus_name['amount'];
				
				$bank = $prev_bank + $Stat_bank ;
				
				$result_for_sector = mysqli_query($connection,"SELECT sector FROM expense_sector WHERE id  = '$sector'");
		$test_for_sector = mysqli_fetch_array($result_for_sector);
				
				$sector=$test_for_sector['sector'];
				
				
										
?>  
<style>
body
{
margin:0;
padding:2;
}
.header
{


}

.logo
{
background-color: buttonface;
    float: left;
    height: 200px;
    width: 200px;
}
.right_site
{

}

td
{
font-size:15px;

}
@media print{

#notprintableArea { visibility: hidden; }

}
</style>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<div style="width: 100%;font-size: 15px; text-align:center"> 
<div class="">
<div style="font-size:20px;text-align:center"><span style="background:#834042;color:#fff;border:2px solid #834042;border-radius:50px;padding:5px;">EXPANSE INVOICE</span></div>
<div style="font-size:20px;text-align:center"> Easynet </div>
<div style="font-size:15;margin-bottom:4px"><b>Corporate Office</b><br />
1029, Sufia Monzil-1
Zakir Hossain Road by lane<br /> <b>
East Nasirabad, Chittagong </b>
</div>
<div style="font-size:16px;text-align:center"><span style="margin-bottom:4px;border:2px solid #BB8889;border-radius:50px;padding:3px;"> Call : 031-2556396, 01777-717676</span></b> 
</div>
<div> Invoice no : <?php echo $invoice_no; ?>&nbsp; &nbsp; Date :
<?php
echo  ($date) ; ?> </div>

   </div>
<hr />
<table border="1" align="center" style="width:80%">

	<tr>
		<th>Receiver</th>
		<th>Cash</th>
		<th>Bank</th>
		<th>Cheque No(if Bank)</th>
		<th>Cheque Date</th>
		<th>Sector</th>
		<th>Details</th>
	</tr>
<?php 
 echo "<tr>";
												echo "<td>$name</td>";
                                                echo "<td>$cash</td>";
                                                echo "<td>$bank</td>";
                                                echo "<td>$cheque_no</td>";
                                                echo "<td>$cheque_date</td>";
                                                echo "<td>$sector</td>";
                                                echo "<td>$description</td>";
 ?>

</table>
<!--<b style="font-size: 35px;">----------------</b>-->
<?php
}
?>
</td>
</tr>
</table>
<!--Exchange to be made within 3 days-->
<br/>
You have to bring this invoice for any further query.
<br/>
Thank you for your co-operation.
<br/>
<div style="float:right; text-align:right; padding-right:50px;">Receiver Signature</div> 
</div> 

<script>
window.print()
</script>
		
	<script>
   opener.location.href = opener.location.href;
</script>
		


