<?php include('parent/callMe.php');?>

<?php include('Sessioncheck.php');?>

<?php   



$b=$_SESSION['branch'];

$mn=$_REQUEST['month'];

$year=$_REQUEST['year'];




$clearStudents="SELECT * FROM eduportal_monthly_challan WHERE month_id='$mn' and year='$year' and branch_id='$b' and paid_status = '1'"; 

 //echo $clearStudents;

$WorkAssignListings=$m->query($clearStudents);

   



 



  // getting branch details

  $branch=getBranch($m);



$fee_types = $m->get("eduportal_fee_types");



?>

<!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Print Fee Report </title>

<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<script type="text/javascript">

// window.print();

</script>

<style type="text/css">



tr th {border-top:1px solid gray;border-left:1px solid gray;border-bottom:1px solid gray;text-align:center;background-color:lightgray;font-size:12px;padding:0.5%;}

tr td {border-bottom:1px solid gray;border-left:1px solid gray;font-size:12px;padding:0.5%;}

  

.border{border:1px solid black;}

.center{text-align:center;}

.alignment{padding-left:1%;text-align:left;}





.centertable {

  margin-left: auto;

  margin-right: auto;

}



</style>

</head>

<body style="font-size:12px;">







<div style="text-align:center;font-size:24px;font-weight:bold;margin:0 auto;"><?php echo $branch[0]['Branch_Name'];?> 



</div>



<br>



<div style="text-align:center;font-size:18px;font-weight:bold;"> Students Advance Fee Report List



 </div>



<hr style="width:100%;">





<div style="width:50%; float:left;font-size:16px; "> <b> Report Month:</b> <?php echo getMonthName($m,$mn);?>  </div>

<div style="width:50%;text-align:center;float:left;font-size:16px;"> <b> Year:</b> <?php echo $year;?> </div>



<br>

   

<table style="width:100%;font-size:16px;" cellspacing="0">

      

  <thead>

    <tr>



        <th width="3%" class=" center"> S.No</th>

        <th width="12%" class=" alignment"><strong>Student Name</strong></th> 

        <th width="10%" class=" alignment"><strong>Father Name</strong></th>

        <th width="10%" ><strong>Cell No</strong></th>

        <th width="8%" class=" alignment"><strong>Class/Sec</strong></th>

        <th width="10%" style="border-right:1px solid black" ><strong>Roll No</strong></th>

        <th width="10%" style="border-right:1px solid black" ><strong>Adm No</strong></th>          

        <th width="10%" class="center" style=""> Remaning Amount. </th>

                     



                        

          </tr>

        </thead>

        <tbody>

   

       <?php 

      $count=1;

     

      

      

      foreach($WorkAssignListings as $WorkAssignListVal)  { 


        $m->where("user_id", $WorkAssignListVal['paid_fee_user_id']);

        $userName=$m->get("edu_user_config");

       // print_r($userName);



        $m->where("student_id", $WorkAssignListVal['student_id']);

        $StdData=$m->get("edu_student_details");

        //print_r($StdData);
  

    if($WorkAssignListVal['remaining_amount']>= '0') {
  
      $continue;
   
    }





   ?>

        <tr> 

                  <td class="center"> <?php echo $count; $count++;?> </td>

                  <td  class="alignment">

                    <a style="text-decoration: none;" href="pay_fee.php?student=<?php echo $WorkAssignListVal['student_id']; ?>">

                      <?php echo  $StdData[0]['first_name']; ?>

                      </a></td>

                  <td  class="alignment"><?php echo  $StdData[0]['last_name']; ?></td>

                  <td  class="center"> <?php echo  $StdData[0]['cell_no']; ?></td>

                  <td style="padding-left:1%;">

                  <?php echo  getClassName($m,$StdData[0]['class_id'])."-".getSectionName($m,$StdData[0]['section_id']);  ?>              

                </td>

                <td  class="center" ><?php echo  $StdData[0]['candidate_roll_no']; ?></td>

                <td  class="center" ><?php echo  $StdData[0]['ref_no']; ?></td> 

                <td  class="center" ><?php echo  $WorkAssignListVal['remaining_amount']; ?></td>
          

              </tr>



       <?php  } ?>





       

       

            

           

        </tbody>

        

    </table>





     



</body>

</html>

