<style>
.monthly-defaulters{width:50%; padding:20px;margin-top:30px; box-shadow: 0 0 2px #EDEDED; padding-bottom:20px !important;float:left; min-height:80px;}    
.def{background:#fff;min-height:1000px;}
body{background:#EDEDED;}
.form-group select{width:25%;float:left;border-radius:0px;}
#loaddata{font-size:20px;font-weight:600;}

.form-group button{width:25%;float:left;border-radius:0px;}
#loaddata{width:100%; box-shadow:0 0 2 px blue;text-transform:uppercase;}
@media only screen and (max-width:767px){
.monthly-defaulters{width:100% !important;padding:10px !important;
margin-top:20px;box-shadow: 0 0 2px #EDEDED;min-height:50px; padding-bottom:0px !important; }   

.form-group button{width:100% !important;float:left;border-radius:0px;}

.def{background:#fff;min-height:500px !important;}

.form-group select{width:100%;float:left;border-radius:0px;}
    
}
</style>
<style>
/* The container */
.form-group-1{
  display: block;
  position: relative;
  float:left;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width:30%;
}

/* Hide the browser's default checkbox */
.form-group-1 input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
}

/* On mouse-over, add a grey background color */
 .form-group-1:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
 .form-group-1 input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
 .form-group-1 input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
 .form-group-1 .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}



</style>
<div class="container def">
<div class="row">
<div class="col-sm-12">
<div class="monthly-defaulters">
<div class="form-group">
<select id="month" class="form-control">
<option value="">Select Month</option>    
<option value="april">April</option>
<option value="may">May</option>
<option value="june">June</option>
<option value="july">July</option>
<option value="august">August</option>
<option value="september">September</option>
<option value="october">October</option>
<option value="november">November</option>
<option value="december">December</option>
<option  value="january">January</option>
<option value="februry">February</option>
<option value="march">March</option>
</select>    
<button type="button" id="get_defaulter" class="btn btn-info"> Defaulter</button>
</div>  
</div>  

<div class="monthly-defaulters">
<div class="form-group">
 <div id="loaddata" >
    
</div> 
</div>    
</div>

</div>    

<div class="col-sm-12">
<div class="monthly-defaulters">
<div class="form-group">
<!--<select id="month" class="form-control">-->
<!--<option value="">Select Month</option>    -->
<!--<option value="april">April</option>-->
<!--<option value="may">May</option>-->
<!--<option value="june">June</option>-->
<!--<option value="july">July</option>-->
<!--<option value="august">August</option>-->
<!--<option value="september">September</option>-->
<!--<option value="october">October</option>-->
<!--<option value="november">November</option>-->
<!--<option value="december">December</option>-->
<!--<option  value="january">January</option>-->
<!--<option value="februry">February</option>-->
<!--<option value="march">March</option>-->
<!--</select>     -->

 <div class='month-item'>
<label class='form-group-1'>Apr
<input type='checkbox' name='10'  value="april" class='fee' id='april' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>May
<input type='checkbox' name='10'  value="may" class='fee' id='may' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Jun
<input type='checkbox' name='10'  value="june" class='fee' id='june' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Jul
<input type='checkbox' name='10'  value="july" class='fee' id='july' month='october'>
<span class='checkmark'></span>

</label>
</div> 

<div class='month-item'>
<label class='form-group-1'>Aug
<input type='checkbox' name='10'  value="august" class='fee' id='august' month='october'>
<span class='checkmark'></span>

</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Sep
<input type='checkbox' name='10'  value="september" class='fee' id='september' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Oct
<input type='checkbox' name='10'  value="october" class='fee' id='october' month='october'>
<span class='checkmark'></span>

</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Nov
<input type='checkbox' name='10'  value="november" class='fee' id='november' month='october'>
<span class='checkmark'></span>

</label>
</div> 
<div class='month-item'>
<label class='form-group-1'>Dec
<input type='checkbox' name='10'  value="december" class='fee' id='december' month='october'>
<span class='checkmark'></span>

</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Jan
<input type='checkbox' name='10'  value="january" class='fee' id='january' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Feb
<input type='checkbox' name='10'  value="february" class='fee' id='february' month='october'>
<span class='checkmark'></span>
</label>
</div> 
 <div class='month-item'>
<label class='form-group-1'>Mar
<input type='checkbox' name='10'  value="march" class='fee' id='march' month='october'>
<span class='checkmark'></span>
</label>
</div> 


<select id="classes" class="form-control">
<option value="">Select Class</option>    
<option value="PG">PG</option>
<option value="LKG">LKG</option>
<option value="UKG">UKG</option>
<option value="1">Class 1</option>
<option value="2">Class 2</option>
<option value="3">Class 3</option>
<option value="4">Class 4</option>
<option value="5">Class 5</option>
<option value="6">Class 6</option>
<option  value="7">Class 7</option>
<option value="8">Class 8</option>
<option value="9">Class 9</option>
<option value="10">Class 10</option>
</select>     

<select id="section" class="form-control">
<option value="">Select Section</option>    
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E </option>
<option value="F">F </option>
<option value="G">G</option>
<option value="all">All Sections</option>
</select>     

<button type="button" id="get_extra_defaulter" class="btn btn-info">Defaulter</button>
</div>

</div>  

<div class="monthly-defaulters">
<div class="form-group">
 <div id="loaddata1" >
    
</div> 
</div>    
</div>


</div>

</div>    
</div>
  
<script>
$(document).ready(function(){

$("#get_defaulter").click(function(){
month = $("#month").val();    
// alert(month);
if(month == ''){
swal("Select a month");
}else{



// $("#loaddata").html(month);        
$.ajax({
url: '<?php echo base_url() ?>FeeManagement/defaulter_link/',
type: 'POST', 
data: {month:month},
success: function(data){
// alert(data);

$("#loaddata").html(data);
}
});    
    
 
    
}
})



$("#get_extra_defaulter").click(function () {
var fee_amount=[];    
var fee_month = [];
var fee_amounts=[];    
var fee_months = [];
var fee_date;

var month_name;
var status_4 =0;
var status_5= 0;
var status_6 =0;
var status_7 =0;
var status_8 =0;
var status_9 =0;
var status_10 =0;
var status_11 =0;
var status_12 =0;
var status_1 =0;
var status_2 =0;
var status_3 =0;

var student_class; var section;

student_class=$("#classes").val();
section =$("#section").val();
$.each($("input[class='fee']:checked"), function(){
month_name = $(this).val();
fee_months.push($(this).val());
// month_name = $(this).attr("month");
if(month_name == 'april'){status_4 = 1;}else if(month_name == 'may'){status_5 = 1;}else if(month_name == 'june'){status_6 = 1;}else if(month_name == 'july'){status_7 = 1;}else if(month_name == 'august'){status_8 = 1;}else if(month_name == 'september'){status_9 = 1;}else if(month_name == 'october'){status_10 = 1;}else if(month_name == 'november'){status_11 = 1;}else if(month_name == 'december'){status_12 = 1;}else if(month_name == 'january'){status_1 = 1;}else if(month_name == 'february'){status_2 = 1;}else if(month_name == 'march'){status_3 = 1;}


});
// alert(fee_months);
// alert(status_1);
// alert(status_2);
// alert(status_3);
// alert(status_4);

if(status_1 ==0 & status_2 ==0 & status_3 ==0 &status_4==0 & status_5 ==0 & status_6==0 & status_7==0 &status_8 ==0 & status_9==0 & status_10==0 &status_11==0 & status_12==0){
    swal("Select month");
}
else if(student_class ==''){
swal("Select Class");    
}else if(section ==''){
swal("Select Section");    
}else{
 
$.ajax({
url: '<?php echo base_url() ?>FeeManagement/defaulter_extra_link/',
type: 'POST', 
data: {student_class:student_class,section:section,status_1:status_1,status_2:status_2,status_3:status_3,status_4:status_4,status_5:status_5,status_6:status_6,status_7:status_7,status_8:status_8,status_9:status_9,status_10:status_10,status_11:status_11,status_12:status_12},
success: function(data){
// alert(data);

$("#loaddata1").html(data);
}
});  
    
}






});

    
});    
</script>