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


       
$sql = " select student_id, first_name, last_name, cell_no, class_id, section_id, ref_no, candidate_roll_no from  edu_student_details where status='0' AND branch_id=".$_SESSION['branch'];
//echo $sql;
$WorkAssignListings = $m->query($sql);
 
 ?>


<!DOCTYPE html>
<html lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <!-- Meta, title, CSS, favicons, etc. -->
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Student Uncreated Challan | EduPortal</title>
    
    <?php include('RootMe/css_links.php');?>



  </head>
  



  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
    <?php include('RootMe/sidebar.php');?>

    <?php include('RootMe/header.php');?>
   
<!-- page content -->
  <div class="right_col" role="main">
  <div class="row" style="background-color: white;">
   
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">
    <a href="monthly_challan_selected_students.php" target="_blank" class="btn btn-info" style="padding: 10px 10px; font-size:14px;color:white;float: right;"><i class="fa fa-file"></i>&nbsp;&nbsp;Genrate Monthly Challan Selected Students</a>
 <div class="" style="margin-top:10px;">
      
      <div class="clearfix"></div>
    </div>
    <br>

     
<h2 style="text-align: center;">Students Un-Created Challan (<?php echo getMonthName($m,$_REQUEST['month']);?>)</h2>
 
    <table id="listofstudents" data-page-length='500' class="table table-striped table-bordered" style="width:100%;font-size:12px;">
          
          <thead>
            <tr>
                <th width="2%">S.No</th>
                <th width="15%">Student Name</th>
                <th width="15%">Father Name</th>
                <th width="6%">Roll#</th>
                <th width="6%">Adm#</th>
                <th width="10%" style="text-align:center;"> Class/Secion </th>
                <th width="10%"> Action </th>               
                

            </tr>
        </thead>
        <tbody>
   
     
     <?php 
      
      $student_balance;
      $counter=1;

      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

      
        // now checking if the challan of this student against the selected details is created just skip them   

        $m->where("session_id", $_REQUEST['session']);      
        $m->where("month_id", $_REQUEST['month']);
        $m->where("student_id", $WorkAssignListVal['student_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $month_chalan=$m->get("eduportal_monthly_challan");
   

       if(count($month_chalan)>0){
          continue;
      }
     

    ?>              
  
        <tr>

        <td style="text-align:center;"> <?php echo $counter; $counter++?>  </td>

        <td> <?php echo $WorkAssignListVal['first_name'];?>  </td>

        <td> <?php echo $WorkAssignListVal['last_name'];?>  </td>

        <td> <?php echo $WorkAssignListVal['candidate_roll_no'];?> </td>

        <td> <?php echo $WorkAssignListVal['ref_no'];?> </td>

        <td style="text-align:center;"> <?php echo getClassName($m,$WorkAssignListVal['class_id']);?>-
        <?php echo getSectionName($m,$WorkAssignListVal['section_id']);?> </td>   

        <td>

          <a target="_blank" class="btn btn-primary" href="pay_fee.php?kasdfasdjfkadsfioasdkffedfadsnfasdnfadhnvxczvdfansdfqeyhwrouyefjkdnxdvcxzvzxcvhakdsnf,adsfkadslfdasfdchvzkclxjvnasdfasdfadshfkajsdf&student=<?php echo $WorkAssignListVal['student_id'] ?>">Create Individual Challan</a>
        </td>          


              </tr>



<?php   } ?>

     
           
        </tbody>
        
    </table>




  </div>
  <div class="clearfix"></div>
</section>         
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

     <!-- jQuery -->
    <script src="js/ajax_functions.js"></script>  

    <?php include('RootMe/js_linksscript.php');?>

  <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
    <script>
        $(document).ready(function() {
        
          $(document).ready(function() {
            $('#listofstudents').DataTable({
              "pageLength": 500
            });
            } 
          );

        $("th").removeClass("sorting");
        } 
        );
    </script>
  </body>
</html>
