<?php
$id=$this->uri->segment('3');


?>

<style>
    body{background:#EAEDED;}
    a{color:black;}
a:hover{text-decoration:none;}
</style>

<div class="container-fluid mt-3 mb-3">
<div class="row">
<div class="col-sm-12 bg-white p-3">

<ul class="breadcrumb">
<li class="breadcrumb-item"><?php echo $this->session->userdata('ac_year'); ?></li> 
<li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Welcome">Home</a></li> 
<li class="breadcrumb-item">Fee Heads</li> 
</ul>    
    
<a href="<?php echo base_url();?>Fee/add_new_fee_head" class="btn btn-sm btn-info">Add New Fee Head</a>    
<?php
$table1='academic_session_details';
$get_data=$this->NewFeeModel->get_item_data($id,$table1);
if($get_data){
foreach($get_data as $data){
?>
<p class="bg-info mt-3 p-3 text-white"><?php echo $data['y1']; echo "-";  echo $data["y2"];?></p>
<?php
}
}
?>
    

<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>Fee Head</th>
<th>Status</th>
<th>Edit</th>
<th>Fee</th>
</tr>
</thead>
<tbody>
<?php    
$table='fee_heads';
$count=0;
$all_heads=$this->NewFeeModel->get_fee_heads_session_wise($id,$table);
if($all_heads){
foreach($all_heads as $fee_heads){
$count=$count + 1;
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo $fee_heads['title']; ?></td>
<td></td>
<td><a href="#" class="btn btn-sm btn-warning">Edit</a></td>
<?php
if($fee_heads['fee_type']=='yearly'){
?>
<td><a href="<?php echo base_url();?>Fee/add_fee_structure/<?php echo $fee_heads['id']; ?>" class="btn btn-sm btn-info">Add Fee</a></td>
<?php
}
if($fee_heads['fee_type']=='monthly'){
?>
<td><a href="<?php echo base_url();?>Fee/add_fee_structure_monthly/<?php echo $fee_heads['id']; ?>" class="btn btn-sm btn-info">Add Fee</a></td>
<?php
}
?>

</tr>

<?php
}
}
?>
</tbody>
</table>
</div>

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