<?php 
$fee_head=$this->uri->segment('3');
$table='misc_fee_heads';
$fee_head_title='';
$courses_table='courses';

$all_courses_data=$this->MiscellaneousFeeModel->get_data($courses_table);
$get_fee_head_info=$this->MiscellaneousFeeModel->get_item_data($fee_head,$table);
if($get_fee_head_info){
    foreach($get_fee_head_info as $fee_head_info){
        $fee_head_title=$fee_head_info['fee_head'];
    }
}

$countcourse=0;
if($all_courses_data){
    foreach($all_courses_data as $course_data){
        $countcourse=$countcourse + 1;        
    }
}
?>
<style>
    #course_item{width:25%;float:left;border-radius:5px;padding:10px;}
</style>
<div class="container mt-3 mb-3 bg-white pt-3 pb-3">
    <div class="row">
        <div class="col-sm-12">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Welcome">Home</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Miscellaneous">Miscellaneous</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Miscellaneous/fee_heads">Fee Heads</a></li>
                <li class="breadcrumb-item">Update Fee Structure</li>
            </ul>
            
            
            <form method="post" action="#">
                
            </form>
                <div class="form-group">
                    <lable>Fee Head</lable>
                    <input type="text" name="fee_head_title" value="<?php echo $fee_head_title;?>" class="form-control" readonly> 
                </div>
                <div class="form-group">
                    <label>Fee Amount</label>
                    
                </div>
                
                <div class="form-group">
                    <label>Applicable Courses</label><br>
                    
                    <?php
                    $count_course=0;
                    if($all_courses_data){
                        foreach($all_courses_data as $course_data){
                            $count_course=$count_course + 1;
                    ?>
                    <div id="course_item">
                        <input type="checkbox" name="" class="applied_course p-2" value="<?php echo $course_data['id']; ?>">&nbsp; <?php echo $course_data['course']; echo "&nbsp;"; echo $course_data['subject_stream'];?>
                        <input type="number" value="" class="form-control" name="fee_amount" placeholder="Fee Amount">
                    </div>
                    <?php
                        }
                    }
                    ?>
                </div>
            
        </div>
    </div>
</div>