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

if($_REQUEST['class_id']!=NULL){

  $m->where("classs_id", $_REQUEST['class_id']);

  if($_REQUEST['session']!=NULL){
  $m->where("session_id", $_REQUEST['session']);
  }

  if($_REQUEST['month']!=NULL){
  $m->where("month_id", $_REQUEST['month']);
  }


$m->where("branch_id", $_SESSION['branch']);
$WorkAssignListings = $m->get("eduportal_monthly_challan");
}


// getting branch details

$branch_details =getBranch($m);

// code for generating total records 
$total_records=0;

foreach($WorkAssignListings as $WorkAssignListVal)
{ 
      // getting students details 
      $m->where("student_id", $WorkAssignListVal['student_id']);
      $m->where("status", 0);
      $student=$m->get("edu_student_details");  

    if($student[0]['section_id']!=$_GET['section'] && $_GET['section']!=''){
      continue;
   }
$total_records++;
}


?>


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

 

  </head>


<script type="text/javascript">

function show_message(){
  
  $("#msg").slideDown('slow').delay(4000).slideUp('slow');
  $("#error").slideDown('slow').delay(5000).slideUp('slow');

}

</script>
 <script>
      

function getsec(id){

    if (window.XMLHttpRequest) {

      // code for IE7+, Firefox, Chrome, Opera, Safari

      xmlhttp=new XMLHttpRequest();

    } else { // code for IE6, IE5

      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

    xmlhttp.onreadystatechange=function() {

      if (xmlhttp.readyState==4 && xmlhttp.status==200) {

        document.getElementById("txt_section").innerHTML=xmlhttp.responseText;
        // alert(xmlhttp.responseText);

      }

    }

    xmlhttp.open("GET","get_section_all.php?class_id="+id,true);

    xmlhttp.send();




  }
      
                


  </script>
  <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">
   

<div class="" style="margin-top:10px;">
      <form class="" action="view_challan.php" enctype="multipart/form-data" method="get">
        <div class="panel panel-default">
          <div class="panel-heading " id="heading"><?php echo $total_records;?> Students Records <span style="float:right;margin-top: -7px;">

          <input type="hidden" value="<?php echo session_id().session_id().session_id().session_id().session_id(); ?>" name="session" />


<div class="pull-right" style="margin-top: 5px;">         


   <?php if($_GET['class_id']){  ?>
  <a href="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php?class_id=<?php echo $_REQUEST['class_id'];?>&month=<?php echo $_REQUEST['month'];?>&session=<?php echo $_REQUEST['session'];?>&section=<?php echo $_GET['section'];?>&action=DeleteAllMonthlyChallan" style="" onClick="return confirm('Are you sure you want to delete All Challan');"  class="btn btn-danger">Delete All Challan </a> <?php } ?>
  <a href="monthly_challan.php" class="btn btn-primary" style="cursor:pointer;">Create Challan</a>
  <a href="fee_reporting.php" class="btn btn-primary" style="cursor:pointer;">Fee Reports</a>

     
<?php  if($_REQUEST['class_id']!=NULL){ ?>


  <a href="print_all_vouchers_single.php?a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156&amp;class_id=<?php echo $_REQUEST['class_id'];?>&month=<?php echo $_REQUEST['month'];?>&session=<?php echo $_REQUEST['session'];?>&section=<?php echo $_GET['section'];?>&8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1" target="_blank" class="btn btn-success" > <i class="fa fa-print m-right-xs" target="_blank"></i> Print Single Vouchers</a>

<?php } ?>

   
<?php  if($_REQUEST['class_id']!=NULL){ ?>


  <a href="print_all_vouchers_db.php?a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156&amp;class_id=<?php echo $_REQUEST['class_id'];?>&month=<?php echo $_REQUEST['month'];?>&session=<?php echo $_REQUEST['session'];?>&section=<?php echo $_GET['section'];?>&8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1" target="_blank" class="btn btn-success" > <i class="fa fa-print m-right-xs" target="_blank"></i> Print Double Vouchers</a>

<?php } ?>

 
<?php  if($_REQUEST['class_id']!=NULL){ ?>


  <a href="print_all_voucheres.php?a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156&amp;class_id=<?php echo $_REQUEST['class_id'];?>&month=<?php echo $_REQUEST['month'];?>&session=<?php echo $_REQUEST['session'];?>&section=<?php echo $_GET['section'];?>&8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1" target="_blank" class="btn btn-success" > <i class="fa fa-print m-right-xs" target="_blank"></i> Print Triple Vouchers</a>

<?php } ?>



  <a onClick="$('#advanceSearch').toggle('blind')" class="<?php //if($_REQUEST['class_id']==NULL){echo 'blink';}?>btn btn-primary" style="cursor:pointer;">Advance Search</a>


</div>



          </span><div class="clearfix"></div> </div>
          <div class="panel-body">
          
            <div class="col-md-12" id="advanceSearch" style="display:none;">
             <div class="col-md-3 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Class</label>
 
                  <select name="class_id" class="form-control" onChange="getsec(this.value)" required >
                    <option value="">Select Class</option>

                    <?php
                    $m->where("branch_id", $_SESSION['branch']);
                    $WorkAssignList = $m->get("edu_class_config");
                    foreach($WorkAssignList as $WorkAssignListVal)
                    { ?>

                       <option <?php if($_REQUEST['class_id']==$WorkAssignListVal['class_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['class_id']; ?>"><?php echo $WorkAssignListVal['Class_Name']; ?></option>


                            <?php
                    } ?>

                </select> 
                </div>
              </div>
              
              
            
              <div class="col-md-3 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Section</label>
                    <select name="section" id="txt_section" class="form-control"   >
                      <option value="">All</option>
                   <?php
                              if(isset($_REQUEST['section']))
                              { 

                              $m->where("class_id", $_REQUEST['class_id']);    

                              $secondLevel = $m->get("edu_adm_section_detail");
                              
                              foreach($secondLevel as $secondLevel_val)
                              {
                              
                               ?>
                                <option <?php if($_REQUEST['section']==$secondLevel_val['section_id']){echo "selected";} ?> value="<?php echo $secondLevel_val['section_id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['section_name'])); ?></option>

                              <?php }   ?>
                                
                          <?php } ?>

                    </select>

                  
                </div>
              </div>         
              
              <div class="col-md-3 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Session</label>
                    <select name="session" class="form-control" >

                             

                        <?php

 
                      $match;
                      if(!isset($_REQUEST['session'])){
                        $match=$_SESSION['current_session'];
                      }else { $match=$_REQUEST['session']; }
                     
       

                        $WorkAssignList = $m->get("edu_session_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($match==$WorkAssignListVal['session_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['session_id']; ?>"><?php echo $WorkAssignListVal['session_year']; ?></option>


                                <?php
                        } ?>

                    </select>
                </div>
              </div>


                 <div class="col-md-3 col-xs-12" style="padding: 8px;">

             <div class="form-group ">

                <label class="required">Challan Month</label>
                    <select name="month" id="month" class="form-control"  required>

                              <option value="">Select Month</option>
                        

                        <?php
                        $WorkAssignList = $m->get("eduportal_month_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($_REQUEST['month']==$WorkAssignListVal['Month_Id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['Month_Id']; ?>"><?php echo $WorkAssignListVal['Month_Name']; ?></option>


                                <?php
                        } ?>

                    </select>
                </div>


        </div> 
        
        
    
              <div class="col-md-3 pull-right" style="padding:2px;">
                <div class="form-group ">
                   <input type="hidden" name="addaccountAdmin" value="1">
                <button type="submit" class="btn btn-primary" style="margin-top: 24px;float: right;">Search</button>
                </div>
              </div>

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

   <?php  if(isset($_SESSION['upsuccess'])){?>


            <div class="alert alert-success" id="msg">
             <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <strong>Success!</strong> Fee challan is paid successfully...
            </div>


          <?php  unset($_SESSION['upsuccess']); }?>     
  
  <form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data">

  
      <input type="hidden" name="action_call" value="SendFeeNotifications"  />
      <input type="hidden" name="session"  value="<?php echo $_REQUEST['session']; ?>" >
      <input type="hidden" name="class" value="<?php echo $_REQUEST['class_id']; ?>" >
      <input type="hidden" name="section" value="<?php echo $_REQUEST['section']; ?>" >
      <input type="hidden" name="month_name" value="<?php echo getMonthName($m,$_REQUEST['month']); ?>" >
      <input type="hidden" name="month" value="<?php echo $_REQUEST['month']; ?>" >
      
    <?php if(count($WorkAssignListings)>0 && $_GET['section']){  ?>

        
            <div class="col-md-3 pull-right " style="margin-bottom:1%;">

             <input type="submit" name="submit" style="padding:3%;" class="btn btn-success pull-right"  value="Send Fee SMS"  />
          
           </div>


      <?php  } ?>    
             

       

    <table id="listofstudents" data-page-length='100' class="table table-striped table-bordered" style="width:100%;background-color:#FFFFFF;">
          
          <thead>
            <tr>
                <th width="15%">Student Name</th>
                <th width="8%">Roll#</th>
                <th width="12%" style="text-align:center;"> Class </th>
                <th width="8%" style="text-align:center;">  Month </th>
                <th width="8%" style="text-align:center;">  Fee </th>
                <th width="8%" style="text-align:center;"> Transport </th>
                <th width="5%" style="text-align:center;"> <?php if ($brid[0]['misc_title']!=NULL){echo $brid[0]['misc_title'];}else {echo 'Misc.';} ?> </th>
                
                <th width="8%"> Balance </th>
                <th width="8%"> Other Fee </th>
                <th width="10%">Total </th>
                <th width="5%"> DueDate </th>
                <th width="8%"> Voucher </th>
                <th width="8%"> Status </th>


            </tr>
        </thead>
        <tbody>
   
     
     <?php 

      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

    // getting students details 

         
          $m->where("student_id", $WorkAssignListVal['student_id']);
          $m->where("status", 0);
          $student=$m->get("edu_student_details");
          //&& $student[0]['class_id']==$_GET['class_id']
         if($student[0]['section_id']!=$_GET['section'] && $_GET['section']!=''){
            continue;
         }


        if(count($student)==0){
          continue;
        }

      
      ?>

        <tr>
                  <td>  

      <?php 
                      
// check if the challan is already created
  

$qr = "select * from  eduportal_monthly_challan where branch_id=".$_SESSION['branch'];

if ($_REQUEST['class_id']!=NULL) {
    $qr .= " AND classs_id=" . $_REQUEST['class_id']. " ";
}

if ($_REQUEST['session']!=NULL) {
    $qr .= " AND session_id=" . $_REQUEST['session']. " ";
}

if ($WorkAssignListVal['student_id']!=NULL) {
    $qr .= " AND student_id=" . $WorkAssignListVal['student_id']. " ";
}

if ($_REQUEST['session']!=NULL) {
    $qr .= " AND session_id=" . $_REQUEST['session']. " ";
}

if ($_REQUEST['month']!=NULL) {
    $qr .= " AND month_id=" . $_REQUEST['month']. " ";
}

$qr .= " order by challan_id  desc limit 1";

//echo $qr;

  $student_challan =  $m->query ($qr);  



   // print_r($student_challan);

    if(count($student_challan)>0){
  
        $student_balance=$student_challan[0]['balance']+0;
        //echo $total."--b--".$collected_amount;

    }else {
      
      $student_balance=$WorkAssignListVal['std_outstanding_blc'];
    
    } 


    ?>             
                 <?php echo $student[0]['first_name'];?> <br>
                 <?php echo $student[0]['last_name'];?>

                 </td>

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

                  <td> <?php echo getMonthName($m,$details['month_id']);?> </td>

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

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

  
  
  
  
               
                 <td style="text-align:center;"> 


                  <a data-toggle="modal" data-target="#previousBalance<?php echo $WorkAssignListVal['student_id'];?>" style="padding: 0px 4px; font-size:14px;"  class="btn btn-warning">

                          <?php echo $student_balance;?>  

                        </a> 


      <!-- Modal -->
      <div id="previousBalance<?php echo $WorkAssignListVal['student_id'];?>" class="modal fade" role="dialog">
        <div class="modal-dialog">

          <!-- Modal content-->
          <div class="modal-content" style="width: 900px;margin-left: -25%;">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title"> Student Balance History  </h4>
            </div>


            <div class="modal-body">



              <p> <?php echo $student[0]['first_name'];?>  <?php echo $student[0]['last_name'];?>  </b>
                (<?php echo getClassName($m,$_GET['class_id']);?>)

              </p>


            </div>


          <br>
          <div class="col-md-12" >
            

            <table border="1" width="100%">  


<?php

// check if the challan is already created
  

$qry = "select * from  eduportal_monthly_challan where branch_id=".$_SESSION['branch'];

if ($_REQUEST['class_id']!=NULL) {
    $qry .= " AND classs_id=" . $_REQUEST['class_id']. " ";
}

if ($_REQUEST['session']!=NULL) {
    $qry .= " AND session_id=" . $_REQUEST['session']. " ";
}

if ($WorkAssignListVal['student_id']!=NULL) {
    $qry .= " AND student_id=" . $WorkAssignListVal['student_id']. " ";
}

if ($_REQUEST['session']!=NULL) {
    $qry .= " AND session_id=" . $_REQUEST['session']. " ";
}

if ($_REQUEST['month']!=NULL) {
    $qry .= " AND month_id=" . $_REQUEST['month']. " ";
}


$qry .= " order by challan_id  desc limit 1";


  $student_chln =  $m->query ($qry);  

 // echo $qry ;

   // print_r($student_chln);



    if(count($student_chln)<=0){
  
            
?>



            <tr>  

                <th colspan="10"  class="thStyle"> OLD BALANCE  </th>
                
              </tr>


             <tr>  

                <th colspan="10"  style="text-align:center;"> 


                <?php 
                $old_balance;
                $m->where("student_id", $WorkAssignListVal['student_id']);
                $student_fee=$m->get("eduportal_student_fee_structure");

                    if($student_fee[0]['std_outstanding_blc']==NULL){
                      echo "0 Rs";

                    } else {
                      echo $student_fee[0]['std_outstanding_blc']." Rs";
                    }

                $old_balance=$student_fee[0]['std_outstanding_blc'];

                ?>



                </th>
                
              </tr>

<?php 

}else {
      
       
?>



              <tr>  

                <th class="thStyle"> Month  </th>
                <th class="thStyle"> Due Date  </th>
                <th class="thStyle"> Monthly Fee  </th>
                <th class="thStyle"> Transport  </th>
                <th class="thStyle"> <?php if ($brid[0]['misc_title']!=NULL){echo $brid[0]['misc_title'];}else {echo 'Misc.';} ?>  </th>
                <th class="thStyle"> Prev.Balance  </th>
                <th class="thStyle"> Total  </th>
                <th class="thStyle"> Paid Fee  </th>
                <th class="thStyle"> Paid Date  </th>
                <th class="thStyle"> Remaining Balance  </th>
                <th class="thStyle"> Status  </th>

              </tr>
<?php 


$history = $student_chln;

if(count($history)<=0){
  echo "<tr> <td colspan='10' style='color:red;text-align:center;'> No record found ! </td> </tr> ";

}


$balance;

foreach($history as $details){

   // getting students details 

  $m->where("student_id", $details['student_id']);
  $m->where("status", 0);
  $student=$m->get("edu_student_details");

?>            
              <tr>  

                <td> <?php echo getMonthName($m,$_REQUEST['month']);?> </td>
                <td> <?php echo date("d-M",strtotime($details['challan_duedate']));?> </td>
                <td> <?php echo $details['tutionfee'];?> </td>
                <td> <?php echo $details['transportfee'];?> </td> 
                <td> <?php echo $WorkAssignListVal['misc_fee'];?> </td> 
                <td> <?php echo $details['balance'];?> </td>

                <td style="text-align:center;"> <?php $totalAmount= $details['tutionfee']+$details['transportfee']+$details['balance'];  echo $totalAmount; ?>   </td>
                                
                <td> <?php echo $details['collected_amount'];?> </td>

                <td> <?php if($details['paying_date']!=NULL){ ?>
                   <?php echo date("d-M",strtotime($details['paying_date']));?> 
                <?php } ?> </td>

                <td> <?php echo $totalAmount-$details['collected_amount'];?> </td>

                <td>



                
             <?php if($details['paid_status']==0 || $details['paid_status']=="0"){ ?>    

                  <a data-toggle="modal" style="padding: 0px 5px; font-size:14px;"  class="btn btn-danger">

                          Not Paid <i class="fa fa-remove" aria-hidden="true"></i>

                          </a> 

                 <?php } else { ?>    


                  <a data-toggle="modal" style="padding: 0px 5px; font-size:14px;"  class="btn btn-success">

                          Fee Paid <i class="fa fa-check" aria-hidden="true"></i>

                          </a> 


                 <?php } ?>   
                
                 </td>


              </tr>


<?php

  $balance+=$totalAmount-$details['collected_amount'];
   

  } // endling loop



}  // ending else condition

 $old_balance=0;
$balance=0;
                
?>            
 
             </table>

          </div>

          <br><br>


            <div class="modal-footer">

             <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>


            </div>



          </div>

        </div>
      </div>

      <!-- ending modal -->



                   </td>







     
       <td style="text-align:center;"> 


        <a data-toggle="modal" data-target="#otherFee<?php echo $WorkAssignListVal['student_id'];?>" style="padding: 0px 4px; font-size:14px;"  class="btn btn-warning">

        <?php echo 0+getFeeAllOtherFee($student[0]['student_id'],$details['challan_id'],$m);?>  

      </a> 


      <!-- Modal -->
      <div id="otherFee<?php echo $WorkAssignListVal['student_id'];?>" class="modal fade" role="dialog">
        <div class="modal-dialog">

          <!-- Modal content-->
          <div class="modal-content" style="width: 900px;margin-left: -25%;">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title"> Other Fee Parameters  </h4>
            </div>


            <div class="modal-body">



              <p> <?php echo $student[0]['first_name'];?>  <?php echo $student[0]['last_name'];?>  </b>
                (<?php echo getClassName($m,$_GET['class_id']);?>)

              </p>


            </div>


          <br>
          <div class="col-md-12" >
            

            <table border="1" width="100%">  


              <tr>  

                <th class="thStyle" style="text-align: center;padding:1%;"> Fee Type  </th>
                <th class="thStyle" style="text-align: center;padding:1%;"> Amount  </th>
              
              </tr>
<?php 

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

if(count($fee_types)<=0){
  echo "<tr> <td colspan='10' style='color:red;text-align:center;'> No record found ! </td> </tr> ";

}

 foreach ($fee_types as $type) {

  $fee=getFeeOfOtherParameter($student[0]['student_id'],$details['challan_id'],$type['feetype_id'],$m);
  if($fee==NULL){
    continue;
  }

?>            
              <tr>  

                <td> <?php echo $type['feetype_name'];?> </td> 
                <td> <?php echo $fee;?> </td> 
                
              </tr>

<?php   } ?>

          
 
             </table>

          </div>

          <br><br>


            <div class="modal-footer">

             <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>


            </div>



          </div>

        </div>
      </div>

      <!-- ending modal -->



               </td>



              <td style="text-align:center;"> <?php $totalAmount= $WorkAssignListVal['tutionfee']+$WorkAssignListVal['transportfee']+$student_balance+$WorkAssignListVal['misc_fee']+getFeeAllOtherFee($student[0]['student_id'],$details['challan_id'],$m); 

               echo $totalAmount; 



/*if($totalAmount==0 ||  $totalAmount=="0"){
  
  continue;
}
*/      if($totalAmount!=0){
 
              ?> 


                <input type="hidden" name="std_name[]" value="<?php echo $student[0]['first_name']; ?>" />
                <input type="hidden" name="balance[]" value="<?php echo $student_balance; ?>" />
                <input type="hidden" name="total_fee[]" value="<?php echo $totalAmount; ?>" />
                <input type="hidden" name="duedate[]" value="<?php echo date("d-M",strtotime($WorkAssignListVal['challan_duedate'])); ?>" />
                <input type="hidden" name="numbers[]" value="<?php echo $student[0]['cell_no']; ?>" />

<?php } ?>

                  </td>


                  <td> <?php echo date("d-M",strtotime($WorkAssignListVal['challan_duedate']));?> </td>

                  <td> <a target="_blank" style="padding: 0px 5px; font-size:14px;" href="print_voucher.php?a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156&amp;student_id=<?php echo $WorkAssignListVal['student_id'];?>&month=<?php echo getMonthName($m,$_REQUEST['month']);?>&month_id=<?php echo $_REQUEST['month'];?>" class="btn btn-warning">

                   <i class="fa fa-print m-right-xs" target="_blank"></i>  Print
                  </a> </td>
          <td> 

      

      <?php if($WorkAssignListVal['paid_status']==0 || $WorkAssignListVal['paid_status']=="0"){ ?>    


          <a data-toggle="modal" data-target="#payChallan2222<?php echo $WorkAssignListVal['student_id'];?>" style="padding: 0px 5px; font-size:14px;" href="#" class="btn btn-warning">

                  Not Paid
                  
            </a> 

         <?php } else { ?>    


          <a data-toggle="modal" style="padding: 0px 5px; font-size:14px;"  class="btn btn-success">

                  Fee Paid <i class="fa fa-check" aria-hidden="true"></i>

                  </a> 


         <?php } ?>   


    




                  </td>


     



              </tr>



               



              <?php
      } ?>



           
            
           
        </tbody>
        
    </table>


 </form>





        </div> 
        </div>


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

    <?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() {
        $('#listofstudents').DataTable();
        $("th").removeClass("sorting");
        } 
        );
    </script>
  </body>
</html>
