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


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>Add Revenue Head | EduPortal</title>
    <?php include('RootMe/css_links.php');?>
  
<script type="text/javascript">

function getSubCat(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("subcatgory").innerHTML=xmlhttp.responseText;
       //alert(xmlhttp.responseText);

      }

    }
    xmlhttp.open("GET","get_exp_subcategory.php?id="+id,true);
    xmlhttp.send();
  }
</script> 
  </head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- <script>
$(document).ready(function(){
  
    $("#div1").fadeOut();
    $("#div2").fadeOut("slow");
    $("#div3").fadeOut(3000);
 
});
</script> -->
  <style>
#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #1E90FF;
  color: #fff;
  text-align: right;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 80%;
  bottom: 30px;
  font-size: 17px;
}

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;} 
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;} 
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}
</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="row" style="background-color: white;">
           
           

<?php


$sql = "SELECT * FROM eduportal_monthly_challan";

// echo $sql;

$changeFormates = $m->query($sql);
 
 
     ?>




     <div class="t col-md-12 col-sm-12 col-xs-12">
                <h3>Revenue Head List<small> (<?php echo count($changeFormates);?> records)</small></h3>
              </div>

              
          
 



                        
<?php  $count=1;

$payingDate;
$paidAgainDate;
foreach($changeFormates as $changeFormate){

 if ($changeFormate['paying_date']!=NULL) {

    $payingDate=date("Y-m-d",strtotime($changeFormate['paying_date']));

  } else {
    $payingDate="";
  }



  if ($changeFormate['paid_again_date']!=NULL) {

    $paidAgainDate=date("Y-m-d",strtotime($changeFormate['paid_again_date']));

  } else {
    $paidAgainDate="";
  }
 

 //echo  $paidAgainDate=date("Y-m-d",strtotime($changeFormate['paid_again_date']));

  $data = array(

          'challan_id' => $changeFormate['challan_id'],

          'month_id' => $changeFormate['month_id'],

          'month_to' => $changeFormate['month_to'],

          'session_id' => $changeFormate['session_id'],

          'classs_id' => $changeFormate['classs_id'],

          'challan_duedate' => $changeFormate['challan_duedate'],

          'collected_amount' => $changeFormate['collected_amount'],

          'paid_again_amount' => $changeFormate['paid_again_amount'],

          'paid_again_date' => $paidAgainDate,

          'paid_again_time' => $changeFormate['paid_again_time'],

          'paid_again_user_id' => $changeFormate['paid_again_user_id'],

          'paid_status' => $changeFormate['paid_status'],

          'paying_date' => $payingDate,

          'total_fine' => $changeFormate['total_fine'],

          'collected_fine' => $changeFormate['collected_fine'],

          'tutionfee' => $changeFormate['tutionfee'],

          'transportfee' => $changeFormate['transportfee'],

          'balance' => $changeFormate['balance'],

          'branch_id' => $changeFormate['branch_id'],

          'student_id' => $changeFormate['student_id'],

          'sms_status' => $changeFormate['sms_status'],

          'challan_created' => $changeFormate['challan_created'],          

          'misc_fee' => $changeFormate['misc_fee'],

          'disc_amount' => $changeFormate['disc_amount'],

          'disc_type' => $changeFormate['disc_type'],

          'paying_time' => $changeFormate['paying_time'],

          'paid_fee_user_id' => $changeFormate['paid_fee_user_id'],

          'paid_by' => $changeFormate['paid_by'],

          'commitment' => $changeFormate['commitment'],

          'commitment_date' => $changeFormate['commitment_date']

          );

        //echo "<pre>"; print_r($data); echo "</pre>";

         // $result = $m->insert('eduportal_monthly_challan_today',$data);

}
?>
                        

                      

                      
           
        
  

    
  <?php include('RootMe/js_linksscript.php');?>
  </body>
</html>
<script>
function toastFunction() {
  var x = document.getElementById("snackbar");
  x.className = "show";
  setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
}
</script>