<div class="container mt-3 mb-3">
<div class="row">
<div class="col-sm-12">

<?php
$profile_name=$this->session->userdata('teacher_name');
$total=0;
$datee= date('Y-m-d');
$date=date('Y-m-d');?>

<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead><tr>
<th>Count</th>
<th>Sch No</th>
<th>Name</th>
<th>Class</th>
<th>Fee Months</th>
<th>Discount</th>
<th>Fee</th>
</tr>
</thead>
<tbody>        
<?php

$count=0;
$data=$this->FeeModel->fetch_date_fee_details($date);
if($data){
    foreach($data as $row){
$count ++;    
$total=$total + $row['total_amount'];
$sid=$row['sid'];
$table='student';
$data_student=$this->FeeModel->fetch_single_student($table,$sid);
foreach($data_student as $student){$student_name=$student['student_name'];}

echo "<tr>";
echo "<td>".$count."</td>";
echo "<td>".$row['sch_no']."</td>";
echo "<td>".$student_name."</td>";
echo "<td>".$row['student_class']."</td>";
echo "<td class='text-uppercase'>".$row['months']."</td>";
echo "<td>".$row['discount']."</td>";
echo "<td>".$row['total_amount']."</td>";
echo "</tr>";
}    
}

?>

</tbody></table></div>
<p class='text-success' style='text-align:right; width:100%;'><b>Total :<?php echo $total;?></b></p>
<p class="text-info" style='text-align:right; width:100%;'><b>Time : <?php echo $time=date('d-m-Y-h-i-s'); ?></b></p>
<p class="text-info" style="text-align:right; width:100%;"><b>Report By :<?php echo $profile_name; ?></b>.</p>



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