<?php //error_reporting(0);
$PageSecurity = 3;
include ('includes/session.inc');
include ('includes/function_lib.php');
include('includes/fun-php.php');
  
 global $db;
   echo '<link href="'.$rootpath. '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />';
     $chequeno =$_REQUEST['chkno'] ;
    $dateto =$_REQUEST['todate'];
    $datefrom =$_REQUEST['fromdate'] ;
    $bankbillamount =$_REQUEST['amt'];
    

?>
<script type="text/javascript" language="javascript">
  function toggle_visibility(id) {
	
	 
       var e = document.getElementById(id);
	       e.style.display = 'none';
		       //alert(e.style.display);
			   window.print();
    }

</script>
<h2><center>Bank Payment Advice</center></h2>

<table width="100%" border="0" >
  <tr >
    <td style="font-size:14px" >To<br>
	    Chief Manager,<br>
		Bank of India,<br>
		Okhla SME Branch,<br>
		New Delhi-110020</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td style="font-size:14px">Dear Sir,<br>
	we are Sending here with Our Ch.No <?php echo $chequeno;?>   Date :- <?php echo $dateto;?> for  <?php echo $datefrom;?> Rs.<?php echo $bankbillamount;?> /- in favour of yourself towards the Salary fir the Month  <?php echo GetMonth($_SESSION['EMPBankPayment'][2]);?>&nbsp; <?php echo $_SESSION['EMPBankPayment'][3];?>of  as per details given Below:-<br></td>
    <td>&nbsp;</td>
  </tr>
</table>

 <table width="100%" border="0" cellspacing="2" cellpadding="1" style="border: solid 1px #CCC">
      <tr class="text">
        <td width="65" height="25" align="center" bgcolor="#CCCCCC"><div align="left"><strong>SR.No.</strong></div></td>
        <td width="136" height="25" align="center" bgcolor="#CCCCCC"><div align="left"><strong>TITLE OF ACCOUNT </strong></div></td>
        <td width="152" height="25" align="center" bgcolor="#CCCCCC"><div align="left"><strong>ACCOUNT NO.</strong></div></td>
        <td width="187" height="25" align="center" bgcolor="#CCCCCC"><div align="left"><strong>AMOUNT</strong></div></td>
   </tr>
      <?php 
      
      
	 
 	
	  $query_sql="select A.emp_name,A.bank_account,B.SalaryProcessStatus ,B.netpay from empmaster A, master_process_salary B where  A.payment_mode='Cheque' and  A.employment_type='".$_SESSION['EMPBankPayment'][1]."' and B.SalaryProcessStatus='Process' and B.payslip_month='".$_SESSION['EMPBankPayment'][2]."' and A.id=B.emp_id ";
  $sql=DB_query($query_sql,$db);
	  while($myrow=DB_fetch_array($sql))
	  {
			$condition="payslip_month='".$_SESSION['EMPBankPayment'][1]."' and emp_id='".$myrow['id']."'";
		 	$finalPayment= $s->GetFieldValue('master_process_salary',$condition ,'balance_loanamt');
 		 
 	  	?>
		 <tr bgcolor="#FFFFFF">
        <td><?php echo $i+1;?></td>
        <td><?php echo $myrow['emp_name'];?>		</td>
        <td><?php echo $myrow['bank_account'];?></td>
        <td><?php echo round($myrow['netpay'],2);?></td>
        </tr>
		 
        <?php $i++;}
		?>
</table>
<br><br>

<table width="100%" border="0" >
  
  <tr>
    <td style="font-size:14px">You are requested to please transfer the above amounts on respective accounts number given.<br>
	<br>Thanking you,<br>Yours truly,<br><br>For <?php echo stripslashes($_SESSION['CompanyRecord']['CompanyName']) ;?><br><br><br>(Authorised Signatory)</td>
  </tr>
</table>
  <div id="foo"><p align="center">
<a href="#" onclick="javascript:toggle_visibility('foo');" >Print</a>   

 </div>
 