<?php include "header.php"; ?>
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
       <?php if($codeecs==""){ ?>
    <a href="feed_session.php" >2. FEED SESSION</a>
                       <?php }elseif($codeec==""){ ?>
                       

                          
          <a href="feed_coll_info.php" >1. FEED COLLEGE INFORMATION</a> <?php }else{ ?>
        <!-- Small boxes (Stat box) -->
        <?php if($login_type!="teacher"){ $txt_dob=$_GET['txt_dob'];
?>
             
       <form action="" enctype="multipart/form-data" method="get">

<?php /*?><script src="jquery-ui.min.js"></script>

<input name="txt_dob" id ="date_input" dateformat="y M d" type="date" style="width:200px; float:left"/>

<?php */?><input name="txt_dob" type="date" value="<?php echo $txt_dob; ?>" id="txt_dob" placeholder="yyyy-mm-dd" data-toggle="tooltip" class="form-control date-picker" style="width:200px; float:left">

<input type="submit" name="submit" value="Get Record" />

</form>

<table width="100%" border="1" cellspacing="2" cellpadding="2" class="table table-bordered table-striped">

  <tr>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Course Name</strong></div></td>

    <td colspan="6" ><div align="center"><strong>Male-Lock</strong></div></td>

    <td colspan="6" ><div align="center"><strong>Female-Lock</strong></div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Year</strong></div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Total Form Filled</strong></div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Total Form Locked</strong></div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Total Fees Paid</strong><br>

    </div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Total Discount</strong></div></td>

    <td rowspan="2" ><div align="center" class="style3 style2"><strong>Total ID Card</strong></div></td>
  </tr>

  <tr>

    <td ><div align="center"><strong>GEN</strong></div></td>

    <td ><div align="center"><strong>OBC</strong></div></td>

    <td ><div align="center"><strong>SC</strong></div></td>

    <td ><div align="center"><strong>ST</strong></div></td>

    <td >MIN</td>
    <td ><div align="center"><strong>TOTAL</strong></div></td>

    <td ><div align="center"><strong>GEN</strong></div></td>

    <td ><div align="center"><strong>OBC</strong></div></td>

    <td ><div align="center"><strong>SC</strong></div></td>

    <td ><div align="center"><strong>ST</strong></div></td>

    <td >MIN</td>
    <td ><div align="center"><strong>TOTAL</strong></div></td>
    </tr>

  <?php

  $txt_dob=$_GET['txt_dob'];

  

  

	 

$query = "SELECT * FROM seme_year where code='$code' and session='$session'  ORDER BY id DESC";

$numresults=mysql_query($query);

 $numrows=mysql_num_rows($numresults);

$result = mysql_query($query) or die("Couldn't execute query");





?>

<?php 

$counter = 1;?>

 <?php

while ( $a_row = mysql_fetch_array( $result ) )

 {

 $college_idi=$a_row['college_id'];

 ?>

   <tr>

    <td>

	

	               <div align="center">

	                 <?php $cid=$a_row['course_name']; $college_type=$a_row['college_type'];

											$queryy = "SELECT * FROM course_name where college_id='$college_idi' && id='$cid' and code='$code' and session='$session' Order by course_name";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

 ?>

	                 

	                 <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

	                 <?php 

				  

				 $course_namei=$a_row['course_name'];

				

				

				 $Course_id=$a_roww[0];

				 if($Course_id==$course_namei){

				  ?> 

	                 <?php echo $a_roww[1];?>

	                 <?php } ?> 

        <?php } ?> - <?php echo $sem_yer=$a_row['sem_yer'];  ?>     </div></td>

    <td>

    <?PHP $resourcehx_223 = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='Gen' and Gender='Male' and code='$code' and session='$session' order by id");

	echo $counthx_223 = mysql_num_rows($resourcehx_223); ?>    </td>

    <td> <?PHP $resourcehx_224 = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='OBC' and Gender='Male' and code='$code' and session='$session' order by id");

	echo $counthx_224 = mysql_num_rows($resourcehx_224); ?></td>

    <td><?PHP $resourcehx_225 = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='SC' and Gender='Male' and code='$code' and session='$session' order by id");

	echo $counthx_225 = mysql_num_rows($resourcehx_225); ?></td>

    <td><?PHP $resourcehx_226 = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='ST' and Gender='Male'  and code='$code' and session='$session' order by id");

	echo $counthx_226 = mysql_num_rows($resourcehx_226); ?></td>

    <td><?PHP $resourcehx_226x = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='Minority' and Gender='Male'  and code='$code' and session='$session' order by id");

	echo $counthx_226x = mysql_num_rows($resourcehx_226x); ?></td>
    <td><strong><?php echo $gmaletotal=$counthx_223+$counthx_224+$counthx_225+$counthx_226+$counthx_226x; ?></strong></td>

    

     <td>

    <?PHP $resourcehx_223f = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='Gen' and Gender='Female'  and code='$code' and session='$session' order by id");

	echo  $counthx_223f = mysql_num_rows($resourcehx_223f); ?>    </td>

    <td> <?PHP $resourcehx_224f = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='OBC' and Gender='Female'  and code='$code' and session='$session' order by id");

	echo $counthx_224f = mysql_num_rows($resourcehx_224f); ?></td>

    <td><?PHP $resourcehx_225f = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='SC' and Gender='Female' and code='$code' and session='$session' order by id");

	echo $counthx_225f = mysql_num_rows($resourcehx_225f); ?></td>

    <td><?PHP $resourcehx_226f = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='ST' and Gender='Female' and code='$code' and session='$session' order by id");

	echo $counthx_226f = mysql_num_rows($resourcehx_226f); ?></td>

    <td><?PHP $resourcehx_226fx = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and Category='Minority' and Gender='Female' and code='$code' and session='$session' order by id");

	echo $counthx_226fx = mysql_num_rows($resourcehx_226fx); ?></td>
    <td><strong><?php echo $gfemaletotal=$counthx_223f+$counthx_224f+$counthx_225f+$counthx_226f+$counthx_226fx; ?></strong></td>

    <td><div align="center"><?php echo $sem_yer=$a_row['sem_yer']; ?></div></td>

   <?php

   //echo $login_session;

//echo $college_idi.'<Br>';

//echo $college_type.'<Br>';

//echo $cid.'<Br>';

//echo $sem_yer.'<Br>';

//echo $txt_dob.'<Br>';



$resourcehx = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and datee LIKE '%$txt_dob%' and code='$code' and session='$session'  order by id");

	$counthx_1 = mysql_num_rows($resourcehx);

	?> <td <?php if($counthx_1!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

   <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name3','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="total_form_fill.php" onClick="return popitup('total_form_fill.php?college=<?php echo $college_idi;?>&&CourseType=<?php echo $college_type; ?>&&Course=<?php echo $cid; ?>&&Course_Details=<?php echo $sem_yer; ?>&&datee=<?php echo $txt_dob; ?>')">

   

    <?php 

	echo $counthx_1;	

	?></a>

	

	</td>

    

    <?php if($login_type!='admin'){

	$resourcehx = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked'  and checked_by='$login_session' and code='$code' and session='$session' order by id");

	$counthx_2 = mysql_num_rows($resourcehx);

	}else{

	

	$resourcehx = mysql_query("SELECT * FROM class2 WHERE college='$college_idi' and `CourseType`='$college_type' and `Course`='$cid' and `Course_Details`='$sem_yer' and pay_date LIKE '%$txt_dob%'  and status ='Locked' and code='$code' and session='$session' order by id");

	$counthx_2 = mysql_num_rows($resourcehx);

	} ?>

    <td <?php if($counthx_2!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

       <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name4','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_form_locked.php?college=<?php echo $college_idi; ?>&&CourseType=<?php echo $college_type; ?>&&Course=<?php echo $cid; ?>&&Course_Details=<?php echo $sem_yer; ?>&&pay_date=<?php echo $txt_dob; ?>&&status=<?php echo '' ?>')"

	>

   

<?php echo $counthx_2; ?></a></td>

     <?php if($login_type!='admin'){

	$resourcehx = mysql_query("SELECT * FROM pay_fees WHERE code='$college_idi' and college_type='$college_type' and `sv`='$cid' and sem_yer='$sem_yer' and  pay_date LIKE '%$txt_dob%' and pay_amount!='' and checked_by='$login_session' and code='$code' and session='$session' order by id");

	$counthx_3 = mysql_num_rows($resourcehx); 

	}else{

	$resourcehx = mysql_query("SELECT * FROM pay_fees WHERE code='$college_idi' and college_type='$college_type' and `sv`='$cid' and sem_yer='$sem_yer' and  pay_date LIKE '%$txt_dob%' and pay_amount!='' and code='$code' and session='$session' order by id");

	$counthx_3 = mysql_num_rows($resourcehx);

	}?><td <?php if($counthx_3!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

       <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name5','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_fee_paid.php?code=<?php echo $college_idi; ?>&&college_type=<?php echo $college_type; ?>&&sv=<?php echo $cid; ?>&&sem_yer=<?php echo $sem_yer; ?>&&pay_date=<?php echo $txt_dob; ?>')"

	>

   

	<?php echo $counthx_3; ?>

    </a></td><?php 

	if($login_type!='admin'){

	$resourcehx = mysql_query("SELECT * FROM pay_fees WHERE code='$college_idi' and college_type='$college_type' and `sv`='$cid' and sem_yer='$sem_yer' and  pay_date LIKE '%$txt_dob%' and dis_amount!='0' and checked_by='$login_session' and code='$code' and session='$session' order by id");

	$counthx_4 = mysql_num_rows($resourcehx);

	}else{

	$resourcehx = mysql_query("SELECT * FROM pay_fees WHERE code='$college_idi' and college_type='$college_type' and `sv`='$cid' and sem_yer='$sem_yer' and  pay_date LIKE '%$txt_dob%' and dis_amount!='0' and code='$code' and session='$session' order by id");

	$counthx_4 = mysql_num_rows($resourcehx);



	} ?>

    <td <?php if($counthx_4!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

       <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name6','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_fee_dis.php?code=<?php echo $college_idi; ?>&&college_type=<?php echo $college_type; ?>&&sv=<?php echo $cid; ?>&&sem_yer=<?php echo $sem_yer; ?>&&pay_date=<?php echo $txt_dob; ?>')"

	>

   

<?php echo $counthx_4; ?></a></td>



<?php

if($login_type!='admin'){

$resourcehx5 = mysql_query("SELECT * FROM id_card WHERE code='$college_idi' and college_type='$college_type' and `course_type`='$cid' and sem_yer='$sem_yer' and  issuedate LIKE '%$txt_dob%%' and checked_by='$login_session' and code='$code' and session='$session' order by id");

	$counthx_5 = mysql_num_rows($resourcehx5);

}else{

	$resourcehx5 = mysql_query("SELECT * FROM id_card WHERE code='$college_idi' and college_type='$college_type' and `course_type`='$cid' and sem_yer='$sem_yer' and  issuedate LIKE '%$txt_dob%%' and code='$code' and session='$session' order by id");

	$counthx_5 = mysql_num_rows($resourcehx5);

} ?>  

    <td <?php if($counthx_5!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

	 <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name233','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_id_card.php?code=<?php echo $college_idi; ?>&&college_type=<?php echo $college_type; ?>&&course_type=<?php echo $cid; ?>&&sem_yer=<?php echo $sem_yer; ?>&&issuedate=<?php echo $txt_dob; ?>')"

	>	

	<?php echo $counthx_5; ?>

    </a>    </td>
  </tr><?php 

  $counthx_12+=$counthx_1;

  $counthx_22+=$counthx_2;

  $counthx_32+=$counthx_3;

  $counthx_42+=$counthx_4;

  $counthx_52+=$counthx_5;

  

  } ?>

  <tr>

    <td bgcolor="#FF0000"><span class="style3"></span></td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>
    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000">&nbsp;</td>
    <td bgcolor="#FF0000">&nbsp;</td>

    <td bgcolor="#FF0000"><span class="style3"></span></td>

    <td bgcolor="#FF0000"><span class="style3"><script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name3','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="total_form_fill.php" onClick="return popitup('total_form_fill.php?college=<?php echo $college_idi;?>&&datee=<?php echo $txt_dob; ?>')"><?php echo $counthx_12; ?></a></span></td>

    <td bgcolor="#FF0000"><span class="style3"> <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name4','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_form_locked.php?college=<?php echo $college_idi; ?>&&CourseType=&&Course=&&Course_Details=&&pay_date=&&status=<?php echo '' ?>')"

	><?php echo $counthx_22; ?></a></span></td>

    <td bgcolor="#FF0000"><span class="style3"><script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name5','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_fee_paid.php?code=<?php echo $college_idi; ?>&&college_type=<?php echo $college_type; ?>&&pay_date=<?php echo $txt_dob; ?>')"

	><?php echo $counthx_32; ?></a></span></td>

    <td bgcolor="#FF0000"><span class="style3"> <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name6','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}



// -->

</script><a href="#" onClick="return popitup('total_fee_dis.php?code=<?php echo $college_idi; ?>&&college_type=<?php echo $college_type; ?>&&pay_date=<?php echo $txt_dob; ?>')"

	><?php echo $counthx_42; ?></a></span></td>

    <?php

$resourcehx5 = mysql_query("SELECT * FROM id_card WHERE code='$college_idi' and college_type='$college_type' and `course_type`='$cid' and sem_yer='$sem_yer' and  issuedate LIKE '%$txt_dob%%' and checked_by='$login_session'  and code='$code' and session='$session' order by id");

	$counthx_5 = mysql_num_rows($resourcehx5); ?>  

    <td <?php if($counthx_5!=''){ ?>  style="background-color:#FFFF00; color:#FFFFFF; font-weight:bold;"<?php } ?>>

	 <script language="javascript" type="text/javascript">

<!--

function popitup(url) {

	newwindow=window.open(url,'name233','height=600,width=1200');

	if (window.focus) {newwindow.focus()}

	return false;

}

// -->

</script><a href="#" onClick="return popitup('total_id_card.php?code=<?php echo $college_idi; ?>&&issuedate=<?php echo $txt_dob; ?>')"

	><?php echo $counthx_52; ?></a></span></td>
  </tr>
</table>
   
 
<table width="100%" border="1" cellspacing="2" cellpadding="2">
  <tr>
    
    <td width="68%" valign="top"><h3 align="center">DEBIT CREDIT - REPORT ON -
        <?php 
if (function_exists('date_default_timezone_set'))
{
date_default_timezone_set('Asia/Kolkata');
}


?>
        <form action="welcome-home.php?title=Dashboard" enctype="multipart/form-data" method="get"><input name="rf" value="

<?php
$rf=$_GET['rf'];
if($rf!=""){
echo $rf; }else{
 echo $rf=date('Y-m-d');}?>" type="text" /><input name="View" class="btn btn-primary" type="submit" /></form>
      </h3><table width="100%" border="2" cellspacing="0" cellpadding="0" class="table table-bordered table-striped">
  <tr>
    <td width="50%" bgcolor="#006600"><span class="style3" style="color:#FFFFFF">Cash Credit Details</span></td>
  </tr>
  <tr>
    <td valign="top"><?php
	 //$rf=date('Y-m-d');
$query = "SELECT * FROM voucher where camount!='' and create_date LIKE '%$rf%' and vtype='Credit'  ORDER BY vtype";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");


?>
<div style="overflow:auto; text-align:center">

<?php if($numrows!=""){?>
<table  cellpadding="1" border="1" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%" class="table table-bordered table-striped">
  <tr>
    <td width="5%" align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"  >
      <div align="right"><em><strong>S.</strong></em></div>
    </div></td>
    <td width="6%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">V.NO</div></td>
    <td width="18%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Cash Amount</div></td>
    <td width="35%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Payment Type</div></td>
    <td width="11%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Voucher Type</div></td>
    <td width="25%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Create Date</div></td>
  </tr>
  <?php 
$counter = 1;?>
  <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
  <tr>
    <td height="20" align="center" valign="top" ><div align="center" >
      <div align="right"><?php echo $counter;?></div>
    </div></td>
    <td align="center" valign="top" >
    <script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name1','height=600,width=1200');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script><a href="print_v.php?id=<?php echo $a_row[3]; ?>" onClick="return popitup('print_v.php?id=<?php echo $a_row[3]; ?>')">
   
   <div align="right"><span class="color2"><?php echo $a_row[3]; ?></span> </div></a>
    </td>
    <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[4]; ?></span> </div></td>
    <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[10]; ?></span> </div></td>
    <td bordercolor="#FFFFCC" ><div align="right"><?php echo $a_row[11]; ?></div></td>
    <td bordercolor="#FFFFCC" ><div align="right"><?php echo $a_row[13]; ?>-<?php echo $a_row[14]; ?> </div></td>
  </tr>
  <?php $counter++;
  $camount+=$a_row[4];
  
  }?>
  <tr>
    <td height="20" colspan="2" align="center" valign="top" bgcolor="#CCCCCC" ><div align="right">G.Total</div>      <div align="right"></div></td>
    <td align="center" valign="top" bgcolor="#CCCCCC" ><div align="right"><?php echo $camount; ?></div></td>
    <td align="center" valign="top" bgcolor="#CCCCCC" ><div align="right"></div></td>
    <td bordercolor="#FFFFCC" bgcolor="#CCCCCC" class=color2><div align="right"></div></td>
    <td bordercolor="#FFFFCC" bgcolor="#CCCCCC" class=color2><div align="right"></div></td>
  </tr>
</table>
</div>
   <?php }?>

<?php if($numrows==""){
  echo "<div  style='border:none; text-align:center'><h3 class='logo2'>No Record Found</h3></div>";
}?></td>

  </tr>
  <tr>
    <td bgcolor="#006600"><span class="style3" style="color:#FFFFFF">Cheque Credit Details</span></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><?php
	 
$query = "SELECT * FROM voucher where chequeamount!='' and create_date LIKE '%$rf%' and vtype='Credit' ORDER BY vtype";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");


?>
<div style="overflow:auto; text-align:center">

<?php if($numrows!=""){?>
   <table  cellpadding="1" border="1" cellspacing="1" bgcolor="#FFFFFF" align="center" style="width:100%" class="table table-bordered table-striped">
 <tr>
	
 <td width="45" align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"  >
   <div align="right"><em><strong>S.</strong></em></div>
 </div></td>
  <td width="62" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">V.No</div></td>
 
  <td width="170" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Cheque Amount</div></td>
  <td width="219" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Bank Details</div></td>
  <td width="96" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Payment Type</div></td>
  <td width="105" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Voucher Type</div></td>
  <td width="236" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Create Date</div></td>
  </tr>
<?php 
$counter = 1;?>
 <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
 
 

 <tr>
 <td height="20" align="center" valign="top" ><div align="center" >
   <div align="right"><?php echo $counter;?></div>
 </div></td>
 <td align="center" valign="top" >    <script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name2','height=600,width=1200');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script><a href="print_v.php?id=<?php echo $a_row[3]; ?>" onClick="return popitup('print_v.php?id=<?php echo $a_row[3]; ?>')">
   
   <div align="right"><span class="color2"><?php echo $a_row[3]; ?></span> </div></a></td>
 
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[5]; ?></span></div></td>
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[6]; ?></span>
   / 
   <span class="color2"><?php echo $a_row[7]; ?></span>
   / 
   <span class="color2"><?php echo $a_row[8]; ?></span>
   /
   <span class="color2"><?php echo $a_row[9]; ?></span>
 </div></td>
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[10]; ?></span> </div></td>
 <td bordercolor="#FFFFCC" class="color2"><div align="right"><?php echo $a_row[11]; ?></div></td>
 <td bordercolor="#FFFFCC" class="color2"><div align="right"><?php echo $a_row[13]; ?>
     <?php echo $a_row[14]; ?> </div></td>
 </tr>



   
  <?php $counter++;
  $camountt+=$a_row[5];
  }?> <tr>
   <td height="20" colspan="2" align="center" valign="top" bgcolor="#999999" ><div align="right">G.Total</div>     <div align="right"></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"><?php echo $camountt; ?></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"></div></td>
   <td bordercolor="#FFFFCC" bgcolor="#999999" class="color2"><div align="right"></div></td>
   <td bordercolor="#FFFFCC" bgcolor="#999999" class="color2"><div align="right"></div></td>
 </tr>
  </table>
</div>
   <?php }?>

<?php if($numrows==""){
  echo "<div  style='border:none; text-align:center'><h3 class='logo2'>No Record Found</h3></div>";
}?></td>
  </tr>
</table>  <table width="100%" border="2" cellspacing="0" cellpadding="0" class="table table-bordered table-striped">
  <tr>
    <td width="50%" bgcolor="#FF0000"><span class="style3" style="color:#FFFFFF">Cash Payment Details - Debit</span></td>
  </tr>
  <tr>
    <td valign="top"><?php
	// $rf=date('Y-m-d');
$query = "SELECT * FROM voucher where camount!='' and create_date LIKE '%$rf%' and vtype='Debit' ORDER BY vtype";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");


?>
<div style="overflow:auto; text-align:center">

<?php if($numrows!=""){?>
<table  cellpadding="1" border="1" cellspacing="1" bgcolor="#FFFFFF" align="center" width="100%" class="table table-bordered table-striped">
  <tr>
    <td width="5%" align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"  >
      <div align="right"><em><strong>S.</strong></em></div>
    </div></td>
    <td width="6%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">V.NO</div></td>
    <td width="18%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Cash Amount</div></td>
    <td width="35%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Payment Type</div></td>
    <td width="19%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Voucher Type</div></td>
    <td width="17%" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Create Date</div></td>
  </tr>
  <?php 
$counter = 1;?>
  <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
  <tr>
    <td height="20" align="center" valign="top" ><div align="center" >
      <div align="right"><?php echo $counter;?></div>
    </div></td>
    <td align="center" valign="top" >    <script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name3','height=600,width=1200');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script><a href="print_v.php?id=<?php echo $a_row[3]; ?>" onClick="return popitup('print_v.php?id=<?php echo $a_row[3]; ?>')">
   
   <div align="right"><span class="color2"><?php echo $a_row[3]; ?></span> </div></a></td>
    <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[4]; ?></span> </div></td>
    <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[10]; ?></span> </div></td>
    <td bordercolor="#FFFFCC" ><div align="right"><?php echo $a_row[11]; ?></div></td>
    <td bordercolor="#FFFFCC" ><div align="right"><?php echo $a_row[13]; ?>-<?php echo $a_row[14]; ?> </div></td>
  </tr>
  <?php $counter++;
  $camount+=$a_row[4];
  
  }?>
  <tr>
    <td height="20" colspan="2" align="center" valign="top" bgcolor="#CCCCCC" ><div align="right">G.Total</div>      <div align="right"></div></td>
    <td align="center" valign="top" bgcolor="#CCCCCC" ><div align="right"><?php echo $camount; ?></div></td>
    <td align="center" valign="top" bgcolor="#CCCCCC" ><div align="right"></div></td>
    <td bordercolor="#FFFFCC" bgcolor="#CCCCCC" class=color2><div align="right"></div></td>
    <td bordercolor="#FFFFCC" bgcolor="#CCCCCC" class=color2><div align="right"></div></td>
  </tr>
</table>
</div>
   <?php }?>

<?php if($numrows==""){
  echo "<div  style='border:none; text-align:center'><h3 class='logo2'>No Record Found</h3></div>";
}?></td>
  </tr>
  <tr>
    <td bgcolor="#FF0000"><span class="style3" style="color:#FFFFFF">Cheque Payment Details - Debit</span></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><?php
	 
$query = "SELECT * FROM voucher where chequeamount!='' and create_date LIKE '%$rf%'  and vtype='Debit' ORDER BY vtype";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");


?>
<div style="overflow:auto; text-align:center">

<?php if($numrows!=""){?>
   <table  cellpadding="1" border="1" cellspacing="1" bgcolor="#FFFFFF" align="center" style="width:100%" class="table table-bordered table-striped">
 <tr>
	
 <td width="57" align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"  >
   <div align="right"><em><strong>S.</strong></em></div>
 </div></td>
  <td width="78" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">V.No</div></td>
 
  <td width="227" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Cheque Amount</div></td>
  <td width="300" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Bank Details</div></td>
  <td width="119" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Payment Type</div></td>
  <td width="246" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Voucher Type</div></td>
  <td width="205" align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF"><div align="right">Create Date</div></td>
  </tr>
<?php 
$counter = 1;?>
 <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
 
 

 <tr>
 <td height="20" align="center" valign="top" ><div align="center" >
   <div align="right"><?php echo $counter;?></div>
 </div></td>
 <td align="center" valign="top" >    <script language="javascript" type="text/javascript">
<!--
function popitup(url) {
	newwindow=window.open(url,'name4','height=600,width=1200');
	if (window.focus) {newwindow.focus()}
	return false;
}

// -->
</script><a href="print_v.php?id=<?php echo $a_row[3]; ?>" onClick="return popitup('print_v.php?id=<?php echo $a_row[3]; ?>')">
   
   <div align="right"><span class="color2"><?php echo $a_row[3]; ?></span> </div></a></td>
 
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[5]; ?></span></div></td>
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[6]; ?></span>
   / 
   <span class="color2"><?php echo $a_row[7]; ?></span>
   / 
   <span class="color2"><?php echo $a_row[8]; ?></span>
   /
   <span class="color2"><?php echo $a_row[9]; ?></span>
 </div></td>
 <td align="center" valign="top" ><div align="right"><span class="color2"><?php echo $a_row[10]; ?></span> </div></td>
 <td bordercolor="#FFFFCC" class="color2"><div align="right"><?php echo $a_row[11]; ?></div></td>
 <td bordercolor="#FFFFCC" class="color2"><div align="right"><?php echo $a_row[13]; ?>
     <?php echo $a_row[14]; ?> </div></td>
 </tr>



   
  <?php $counter++;
  $camountt+=$a_row[5];
  }?> <tr>
   <td height="20" colspan="2" align="center" valign="top" bgcolor="#999999" ><div align="right">G.Total</div>     <div align="right"></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"><?php echo $camountt; ?></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"></div></td>
   <td align="center" valign="top" bgcolor="#999999" ><div align="right"></div></td>
   <td bordercolor="#FFFFCC" bgcolor="#999999" class="color2"><div align="right"></div></td>
   <td bordercolor="#FFFFCC" bgcolor="#999999" class="color2"><div align="right"></div></td>
 </tr>
  </table>
</div>
   <?php }?>

<?php if($numrows==""){
  echo "<div  style='border:none; text-align:center'><h3 class='logo2'>No Record Found</h3></div>";
}?></td>
  </tr>
</table></td>
  </tr>
</table>
  
 <!--End Page Header --><?php } ?>
 <?php } ?>
        <!-- /.row (main row) -->
      </div><!-- /.container-fluid -->
    </section>
  
<?php include "footer.php"; ?>