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

<?php  include("sessioncheck.php"); ?>

<?php



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

$m->where ("branch_id", $_SESSION['branch']);

$m->where("page_id", 23);

$access = $m->get("users_privilege_detail");



/*error_reporting(E_ALL);

ini_set('display_errors', '1');*/



$pageName=basename($_SERVER['PHP_SELF']);



    

     $m->where("page_name", $pageName);

     $video = $m->get("eduportal_modules_pages_detail");



     //getting branch details 



  $m->where("branch_id", $_SESSION['branch']);

  $branch_details = $m->get("edu_branch_config");





   $sessionIDs;

 

  if($_GET["session"]!=NULL ){



      $sessionIDs= $_GET["session"];

    }

    else{

      $sessionIDs= $_SESSION['current_session'];

    }



/*$section=$_REQUEST['section'];

$class=$_REQUEST['class_id'];*/

$branchId=$_SESSION['branch'];



/*$orderBy;



if (!isset($_REQUEST['orderBy'])) {



  $orderBy='asc';



} else {



$orderBy=$_REQUEST['orderBy'];



}*/



if($_REQUEST['CodeCell']=="FamilyCode"){



       $m->where("status", '0');

       $m->where("branch_id", $_SESSION['branch']);

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

  

       $param = array('student_id','ref_no','first_name','last_name','cell_no','branch_id','class_id','section_id','session_id','family_code');

       $WorkAssignListings = $m->get("edu_student_details",null,$param);



      } else {



       $m->where("status", '0');

       $m->where("branch_id", $_SESSION['branch']);

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



       $param = array('student_id','ref_no','first_name','last_name','cell_no','branch_id','class_id','section_id','session_id','family_code');

       $WorkAssignListings = $m->get("edu_student_details",null,$param);



      }

//print_r($WorkAssignListings);



$EditReadOnly;

//if ($_SESSION['designation_id']==12) {

if ($access[0]['edit_access']!=NULL) {

$EditReadOnly="";

} else {

$EditReadOnly="readonly";

}

 

$reqFeeRemarks;

if($brid[0]['fee_paid_remarks']==1){



$reqFeeRemarks = "required";

} else {

$reqFeeRemarks = "";

}

     ?>





<!DOCTYPE html>

<html lang="en">

  <head>

    

    <title>Pay Family Fee | EduPortal</title>

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

   

  </head>



   <script>

function showResultPayFamilyPage(str) {



  var CodeCell=document.getElementById("CodeCell").value; 

  if (str.length==0) { 

    document.getElementById("livesearch2").innerHTML="";

    document.getElementById("livesearch2").style.border="0px";

    return;

  }

  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 (this.readyState==4 && this.status==200) {

      document.getElementById("livesearch2").innerHTML=this.responseText;

      document.getElementById("livesearch2").style.border="1px solid #A5ACB2";

      //alert(this.responseText);

    }

  }

  xmlhttp.open("GET","livesearch_std_family_fee.php?code="+str+"&CodeCell="+CodeCell,true);

  xmlhttp.send();

}

</script>

<script type="text/javascript">

  

function getCodeCell(id){



  //alert(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_codecell_dropdown.php?CodeCell="+id,true);



            xmlhttp.send();









          }







          function total_received(id) {





      var feerec=document.getElementsByName("feerec[]");

      var actualAmount=document.getElementsByName("actualAmount[]");

      var feedis=document.getElementsByName("feedis[]");



      var net=0;

      var disc=0;

      var receiveAmount=0;

      var discountAmount=0;

      var totalreceivedAmount=0;





      for(i=0;i<feerec.length;i++){



      if(feerec[i]!="" || feerec[i]!=null){

    

      if(feedis[i].value=="0" || feedis[i].value==0){



          receiveAmount=parseInt(feerec[i].value);



        } else {



          receiveAmount=parseInt(actualAmount[i].value);



        }



      discountAmount=parseInt(feedis[i].value);



      totalreceivedAmount=receiveAmount-discountAmount;



     // alert(totalreceivedAmount);



       feerec[i].value=totalreceivedAmount;

 



       net= parseInt(net)+ parseInt(feerec[i].value);

       disc= parseInt(disc)+ parseInt(feedis[i].value);



       totalreceivedAmount=0;

       receiveAmount=0;

       discountAmount=0;

     

    }





  }//ending loop



  if(net!=null || net!="" ){

    //alert(net);

    document.getElementById("totaltotal").value=net; 

    document.getElementById("totaltotalDisc").value=disc;

   }

           

      

}





       





  function totalAmountDivide(TAM) {



     var totalRecv=TAM;

     var tStd=document.getElementById("totalStd").value;   

 

     var netTotal=document.getElementsByName("feerec[]");



     var actualFee=document.getElementsByName("actualAmount[]");



     var dividAmt=0;    

      for(i=0;i<netTotal.length;i++){ 

 

       if (totalRecv > parseInt(netTotal[i].value) ) {

        

        

        netTotal[i].value=actualFee[i].value;

        totalRecv=totalRecv-netTotal[i].value;

       // alert(totalRecv);

       }  else { 



        netTotal[i].value=totalRecv;

        totalRecv=totalRecv-netTotal[i].value;

       // alert(totalRecv);

       }

       



       

   

     }//ending loop



     

  }



</script>



<style type="text/css">

    .center {

  margin-left: auto;

  margin-right: auto;

}

  </style>



  <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="" style="background-color: white;">



             <a href="<?php echo $_SESSION['dashboard'];?>" style="margin-left: 33px;">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp;



          <a href="families.php">Families </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp;  



          Families Fee

           

<section class="add_sub_agent" id="table_sub_agent">

  <div class="container">



   



 <div class="" style="margin-top:10px;">

      <form  action="families_fee.php" enctype="multipart/form-data" method="get">
        <div class="panel panel-default">
          <div class="panel-heading"><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" />
          </span>

          <div class="panel-body">          

            <div class="col-md-12" id="" >
             <div class="col-md-2 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Search By Code/Cell</label>


                  <select name="CodeCell" id="CodeCell" data-placeholder="Select" class="chosen-multi-select inputfield form-control">

                          <option <?php if($_REQUEST['CodeCell']=="FamilyCode"){echo "Selected";} ?> value="FamilyCode">Family Code</option>

                          <option <?php if($_REQUEST['CodeCell']=="Cell"){echo "Selected";} ?> value="Cell">Cell</option>
                           
                </select> 

                </div>

              </div>





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

              <form>

                <label> Search Student</label>

                <input type="text" class="form-control" placeholder="Enter | Name | Father Name | Roll No | Admission No" onkeyup="showResultPayFamilyPage(this.value)" value="<?php echo $_GET['code'];?>">

                <div id="livesearch2"></div>

              </form>

            

              <br>

             </div>

              

              

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

                <div class="form-group ">

                  <label class="required">Code/Cell</label>                   



                    <input type="text" name="code" value="<?php echo $_REQUEST['code'];?>" class="form-control" placeholder="Search Code / Cell" >



                  

                </div>

              </div> 





           



              <div class="col-md-1" style="padding:2px;" >

                <div class="form-group ">

                   <input type="hidden" name="addaccountAdmin" value="1">

                <button type="submit" class="btn btn-primary" style="margin-top: 28px;">Search</button>

                </div>

             </div>



              <?php if (isset($_REQUEST['CodeCell'])) { ?>

                

              

              <a style="margin-top:30px" data-toggle="modal" data-target="#FamilyFeeHistory<?php echo $WorkAssignListVal[0]['student_id'];?>" href="#" class="btn btn-primary tabWidth">Print Family Fee History

                </a>


              <?php } ?>


            </div>

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

          </div>

        </div>

      </form>








      <!-- Modal -->

  <div id="FamilyFeeHistory<?php echo $WorkAssignListVal[0]['student_id'];?>" class="modal fade" role="dialog">

    <div class="modal-dialog">



      <!-- Modal content-->

      <div class="modal-content">

        <div class="modal-header">

          <button type="button" class="close" data-dismiss="modal">&times;</button>

          <h4 class="modal-title" style="color:#337ab7;text-align: center; "> Student Family Fee History </h4>

        </div>





        <div class="modal-body">





        <h4 style="text-align: center;" class="fontpopupheading"> <?php echo $WorkAssignListings[0]['last_name'];?> 



        </h4>





      </div>





      <form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post"  enctype="multipart/form-data">





        <input type="hidden" name="action" value="FamilyFeeHistory">

        <input  type="hidden" name="familyCellNo" value="<?php echo $_REQUEST['code']; ?>"/>

        <input  type="hidden" name="CodeCell" value="<?php echo $_REQUEST['CodeCell']; ?>"/>

        



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





          <div class="form-group ">

                  <label class="required">Session</label>

          <select name="session" class="form-control" >



                            



              <?php

              

              

              $sessionsid = $m->get("edu_session_config");

              foreach($sessionsid as $sessionid)

              { ?>



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





                      <?php

              } ?>



          </select>

                </div>





                <table>

                

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

             

               <?php 

                                       

                    $m->orderBy("Month_Id","asc");

                    $SelectMonths = $m->get("eduportal_month_config");



                  foreach($SelectMonths as $SelectMonth) { ?>

                   <tr>

                <div class="col-md-6" >

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" name="months[]" checked value="<?php echo $SelectMonth['Month_Id'];?>" />

                    <span style="font-size:12px;"><?php echo " ".$SelectMonth['Month_Name'];?></span> <span class="checkmark"></span>

                  </label>

                  <?php } ?>

                  </div>

                </div>

              </tr>

            </div>

            

              </table>



           



             



        </div>





                

   

            <div class="modal-footer">



              <button type="submit" class="btn btn-primary" name="submit" >Submit </button>

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





            </div>



          </form>



                



          </div>



        </div>

      </div>



      <!-- ending -->











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



<div class="alert alert-success" id="msg">

 <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>

  <strong>Success!</strong> Fee (<?php echo $_REQUEST['TfeeRec'] ;?>) successfully submitted...

</div>

<?php  unset($_SESSION['submitfamilyFee']); }?>





<div class="center nameHeadingWidth" style="width: 100%;text-align: center;">

<?php if($_GET['code']!=NULL){ ?>

<h4  class="nameHeadingFont"> Father Name: &nbsp; <?php echo $WorkAssignListings[0]['last_name']." | Family Code: ".$_REQUEST['code'];?> </h4>

    <!-- <a href="print_family_profile_voucher_db.php?a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156a61oe8lqc1oclfi4llgnioo156&amp;student_id=<?php echo $WorkAssignListVal[0]['student_id'];?>&month=<?php echo $month[0]['Month_Name'];?>&month_id=<?php echo $familyfees[0]['month_id'];?>&session=<?php echo $session2; ?>&familyCode=<?php echo $WorkAssignListings[0]['cell_no'];?>&familyName=<?php echo $WorkAssignListings[0]['last_name'];?>" style="margin-top:30px" class="btn btn-primary tabWidth">Print Voucher

      </a> -->

<?php } else { ?>

       <div style="color:black;font-size:18px;" class="alert alert-warning alert-dismissible">

          <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>

           <strong>Alert !</strong> Please search Family Code / Cell Number to view fee details!!!

        </div>

<?php } ?>

</div>

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

    </div>

    <br>



     <?php if (isset($_REQUEST['CodeCell'])) { ?>



      <form action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data" class="form-horizontal form-label-left" >



    <input type="hidden" name="action" value="PayFullFamilyFee"/>

    <input type="hidden" name="fee_recv_sms" value="<?php echo $brid[0]['fee_recv_sms']; ?>">

    <input type="hidden" name="familiesFee" value="familiesFee">

    <input type="hidden" name="CodeCell" value="<?php echo $_REQUEST['CodeCell']; ?>">

    <input type="hidden" name="code" value="<?php echo $_REQUEST['code']; ?>">

    <!-- <input type="hidden" name="PiadBy" value="<?php echo $_REQUEST['PiadBy']; ?>"> -->

    <input type="hidden" name="totalStd" id="totalStd" value="<?php echo count($WorkAssignListVal);?>">

    <input type="hidden" name="familiesFeePage" id="familiesFeePage" value="familiesFeePage">



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



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

      <div class="form-group ">

      <label class="required">Paid Date</label>                   



      <input type="date" <?php echo $EditReadOnly;?> name="PaidDate" class="form-control" value="<?php echo date('Y-m-d');?>">             

      </div>

      </div>





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

<div class="form-group ">

<label class="required">Paid By</label>                   



<select name="PiadBy" id="PiadBy" class="form-control" >

<option <?php if($_REQUEST['PiadBy']=="Cash"){echo "Selected";} ?> value="Cash">Cash</option>

<option <?php if($_REQUEST['PiadBy']=="JazzCash"){echo "Selected";} ?> value="JazzCash">JazzCash</option>

<option <?php if($_REQUEST['PiadBy']=="Easypaisa"){echo "Selected";} ?> value="Easypaisa">Easypaisa</option>

<option <?php if($_REQUEST['PiadBy']=="BankAccount"){echo "Selected";} ?> value="BankAccount">Bank Account</option>

<option <?php if($_REQUEST['PiadBy']=="UblOmni"){echo "Selected";} ?> value="UblOmni">Ubl Omni</option>             



</select>





</div>

</div>





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

<div class="form-group ">

<label class="required">Send Message</label>                   



<select name="sendMsg" id="sendMsg" class="form-control" >

<option value="YES">YES</option>

<option value="NO">NO</option>



</select>





</div>

</div>





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

<div class="form-group ">

<label class="required">Remarks</label>                   



<input type="text" name="remarks" <?php echo $reqFeeRemarks;?> class="form-control" placeholder="<?php echo $brid[0]['prefix_paid_remarks']; ?>" value="">             

</div>

</div>



    </div>



    <table width="100%"  class="responsive">  





    <tr>



 <th class="thStyle" style="padding:6px 5px;"> Adm# / Roll#  </th>

 <th class="thStyle" style="padding:6px 5px;"> Student  </th>

 <th class="thStyle" style="padding:6px 5px;"> Class  </th>

 <th class="thStyle" style="padding:6px 5px;"> Month  </th>

 <th class="thStyle" style="padding:6px 5px;"> Current Balance </th>

 <th class="thStyle" style="padding:6px 5px;"> Discount </th>

 <th class="thStyle" style="padding:6px 5px;"> Received </th>

 <th class="thStyle" style="padding:6px 5px;"> Discount Amount </th>

 <th class="thStyle" style="padding:6px 5px;"> Paid Amount </th>

 <th class="thStyle" style="padding:6px 5px;"> Paid Date </th>



  </tr>





    <?php 

/*$count=1;*/



$branch_id=$_SESSION['branch'];

$family_code=$_REQUEST['code'];

$sessionIDs=$_SESSION['current_session'];

$month=date("m");



 if($_REQUEST['CodeCell']=="FamilyCode"){

   

   $sql="SELECT student_id, ref_no, first_name, last_name, cell_no, branch_id, class_id, section_id, session_id, family_code FROM edu_student_details WHERE family_code='$family_code' and branch_id='$branch_id' and status='0' /*and session_id='$sessionIDs'*/ ";

 } else {



  $sql="SELECT student_id, ref_no, candidate_roll_no, first_name, last_name, cell_no, branch_id, class_id, section_id, session_id, family_code FROM edu_student_details WHERE cell_no='$family_code' and branch_id='$branch_id' and status='0' /*and session_id='$sessionIDs'*/ ";



  }



//print_r($sql);

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

$counter=0;



 foreach($WorkAssignListings as $WorkAssignListVal)

      { 



        $studendtID=$WorkAssignListVal['student_id'];



      $sql1="SELECT tutionfee, transportfee, balance, misc_fee, challan_duedate, disc_amount, month_id, paid_status, challan_id, collected_fine, paid_again_amount, collected_amount, paid_again_date, paying_date   FROM eduportal_monthly_challan WHERE branch_id='$branch_id' /*and session_id='$sessionIDs'*/ and student_id='$studendtID' order by challan_id desc limit 1 ";

    //print_r($sql1);   

      $familyfees = $m->query($sql1);



      $counter++;



      $OthersTotal=0+getFeeAllOtherFee($WorkAssignListVal['student_id'],$familyfees[0]['challan_id'],$m);

      $totalAmount= $familyfees[0]['tutionfee']+$familyfees[0]['transportfee']+$familyfees[0]['balance']+$familyfees[0]['misc_fee']+$OthersTotal; 

//echo $WorkAssignListVal['tutionfee'];

    $start_date = strtotime($familyfees[0]['challan_duedate']); 

    $end_date = strtotime(date("Y-m-d"));

    $datediffrence =($end_date - $start_date)/60/60/24;





      $totalAmount1=$totalAmount-$familyfees[0]['disc_amount'];



      $ReceivedAmount+=$familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m);



      $DiscountedAmount+=$familyfees[0]['disc_amount'];



        ?>

      <input type="hidden" name="stdID[]" value="<?php echo $WorkAssignListVal['student_id'];?>">

      <input type="hidden" name="std_no" value="<?php echo $WorkAssignListVal['cell_no'];?>">

      <input type="hidden" name="std_id" value="<?php echo $WorkAssignListVal['student_id'];?>">

      <input type="hidden" name="month_name" value="<?php echo getMonthName($m,$familyfees[0]['month_id']);?>">

      <input type="hidden" name="father_name" value="<?php echo $WorkAssignListVal['last_name'];?>">

      <input type="hidden" name="FeeStatus[]" value="<?php echo $familyfees[0]['paid_status'];?>">

      <input type="hidden" name="challanID[]" value="<?php echo $familyfees[0]['challan_id'];?>">

      <tr style="padding:10px;">  

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

        

         <td><a target="_blank" href="pay_fee.php?student=<?php echo $WorkAssignListVal['student_id'];?>"><?php echo $WorkAssignListVal['first_name'];?></a></td>        

         <td><?php echo getClassName($m,$WorkAssignListVal['class_id']);?></td>         

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



         <?php 



    $student_fine=0;

    $actual_fine=0;



  

   if($branch_details[0]['fine_type']=="0" || $branch_details[0]['fine_type']==0){ 

    $student_fine= $branch_details[0]['late_fee_fine']; } 

  else {    

    $student_fine= ($datediffrence * $branch_details[0]['late_fee_fine']);

   }



        // if row is first and fee is paid then show only collected fine

          if($familyfees[0]['paid_status']==1){

             //echo $WorkAssignListVal['collected_fine'];

             $actual_fine=$familyfees[0]['collected_fine'];

           

          } 

        // if row is first and fee is not paid then calculate fine

          else if(date("Y-m-d")>$familyfees[0]['challan_duedate'] && $familyfees[0]['paid_status']==0 && $familyfees[0]['challan_duedate']!=NULL){

           // echo $student_fine; 

            $actual_fine=$student_fine;

          }      

    

// if not row is first and then show only collected fine

    else {



        // echo $WorkAssignListVal['collected_fine'];

         $actual_fine=$familyfees[0]['collected_fine'];

    }    



//echo $actual_fine."..";



    $totalAmount1+=$actual_fine;

        ?>         



        <input type="hidden" name="actualAmount[]" value="<?php echo $totalAmount1-($familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m));?>">

         <td style="text-align: center;"><?php echo $totalAmount1-($familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m));?></td>



         <td> <input type="text" style="width: 70px; margin:3px;" value="0" id="feediscnt<?php echo $WorkAssignListVal['student_id'];?>"  name="feedis[]"  onkeyup="total_received(<?php echo $WorkAssignListVal['student_id'];?>)"> </td> 



         <td> <input type="text" style="width: 70px; margin:3px;" value="<?php echo $totalAmount1-($familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m));?>" id="feerecv<?php echo $WorkAssignListVal['student_id'];?>"  name="feerec[]"  onkeyup="total_received(<?php echo $WorkAssignListVal['student_id'];?>)"> </td> 



         <td> <?php echo $familyfees[0]['disc_amount'];?></td>



         <td><?php echo $familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m); ?></td>



         <td><?php if ($familyfees[0]['paying_date']!="") {

           echo date("d-M-Y",strtotime($familyfees[0]['paying_date']));

         } ?></td>     



                

      </tr>



<script type="text/javascript">

   

</script>



<input type="hidden" name="totalAmount[]" value="<?php echo $totalAmount1;?>">

<input type="hidden" name="collectedFine[]" value="<?php echo $actual_fine;?>">



<script type="text/javascript">







  </script>



<?php 

$GrandTotal+=$totalAmount1-($familyfees[0]['collected_amount']+$familyfees[0]['collected_fine']+$familyfees[0]['paid_again_amount']+getMoreFee($familyfees[0]['challan_id'],$m));







 }  ?>



<tr>

  <td></td>

  <td></td>

  <td></td>

    

  <td colspan="" style="text-align: center; font-weight: bold;background-color: lightgray;">Grand Total</td>



  <td style="text-align: center; font-weight: bold;background-color: lightgray;"> <?php echo $GrandTotal;?></td>

  <td style="text-align: center; font-weight: bold;background-color: lightgray;">





    <input type="text" onkeyup="totalAmountDivide(this.value)" value="" id="totaltotalDisc" style="width: 70px; float: left;margin: 3px;" name="">







  </td>



  <td style="text-align: center; font-weight: bold;background-color: lightgray;">





    <input type="text" onblur="totalAmountDivide(this.value)" value="<?php echo $GrandTotal;?>" id="totaltotal" style="width: 70px; float: left;margin: 3px;" name="totalreceivedAmt">







  </td>

  <td style="text-align: left; font-weight: bold;background-color: lightgray;"><?php echo $DiscountedAmount;?></td>

  <td style="text-align: left; font-weight: bold;background-color: lightgray;"><?php echo $ReceivedAmount;?></td>

</tr>



<tr>

  <td style="color: red;font-size: 14px;"><b>Note*:</b></td>

  <td colspan="5" style="color: red; font-size: 14px;">Pay full family fee will only apply to the students with unpaid challan.</td>

  

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

<!-- <a type="submit" style="padding: 0px 5px; font-size:14px;float: right;"  class="btn btn-danger">

Pay Full Fee 

</a> -->

<button id="send" type="submit" style="padding: 0px 5px; font-size:14px;float: right;" class="btn btn-danger" >Pay Family Fee</button>

</td>

</tr>

</table>

</form>









<?php  } ?>

<br><br>

  



  </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');?>





    

  </body>

</html>

