<?php 
session_start();
ob_start(); 
include "../common/inc/config.inc.php";
//$objIms->Semifinisheditem_alter();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
input{ border:#CCCCCC solid 1px; border-radius:5px; height:22px; width:200px; padding-left:5px;}
select{ border:#CCCCCC solid 1px; border-radius:5px; height:27px; width:200px;}
.table_bg{ border:#CCCCCC solid 1px; border-radius:5px; height:auto; width:auto; padding:20px; margin-bottom:10px;}
.text_style{ font-family:Arial, Helvetica, sans-serif; font-size:12px;}
.text_style1{ font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:12px;}
.style14 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: bold;
}
.style16 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 24px;
	font-weight: bold;
}

-->
</style>
</head>

<?php
if(isset($_GET["cls_id"]))
{
$cls_id=$_GET["cls_id"];
  
	 $sql_viewtmp2="select * from tbl_account_close_det where md5(close_mtr_id)= '$cls_id' and trans_date !='0' and session_login_id = '".$_SESSION['login_id']."'";
				$res_viewtmp2=mysql_query($sql_viewtmp2);
				
	
					
	}
?>

<script type="text/javascript">
 
function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}

</script>
<body>



<div id="printableArea">
<div style="width:210mm; height:297mm; margin:auto; text-align:center">
<table width="100%" border="0">
 
      <table width="100%" border="1">
      
       <tr>
	  <th nowrap="nowrap" width="6%">SL No</th>
            <th nowrap="nowrap" width="24%">Transaction Date </th>
            <th nowrap="nowrap" width="35%">Head</th>
            
            <th nowrap="nowrap" width="18%">Amount</th>
	   </tr>
	   <?php
	   $i=1;
	   while($rows2=mysql_fetch_assoc($res_viewtmp2)){
	   ?>
	   <tr>
	   <td><?php echo $i++; ?></td>
	   <td><?php echo  $trans_date=$objIms->IntToDate($rows2['trans_date']);?></td>
	   <td><?php  if(($rows2['head']=='Purchase') or($rows2['head']=='Expance') or($rows2['head']=='Purchase Paid') or($rows2['head']=='Transfer')){ echo 'Debited';}else{ echo 'Credited';}?></td>
	     <td><?php echo $rows2['amount'];?></td>
	   
	   </tr>
	   <?php }?>
	   
	   
	  
</table>

</div>


<div align="center"><span class="btn btn-info" onClick="printDiv('printableArea')">Print</span></div>

  

</body>
</html>

