153 lines
7.9 KiB
PHP
153 lines
7.9 KiB
PHP
<div class="wraper responsive-width">
|
|
<main class="" id="main">
|
|
<div class="from-group adding-class form-group_lng" >
|
|
<a href="<?= base_url(); ?>admin/ae-fee-installment/0">
|
|
<button type="button" class="btn btn-success btn-sm">Add course fee installment</button>
|
|
</a>
|
|
</div>
|
|
<?php if($this->session->flashdata('success')) { ?>
|
|
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<p><?php echo $this->session->flashdata('success') ?></p>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if($this->session->flashdata('failed')) { ?>
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<p><?php echo $this->session->flashdata('failed') ?></p>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
|
|
<?php } ?>
|
|
<div class="admin_tempblock">
|
|
<div class="admin_tempsec">
|
|
<div class="admin_sec">
|
|
<div class="subsec_sec">
|
|
<div class="subject_r subject_r_lng" >
|
|
<div class="subject_lsec">
|
|
<div class="subject_lhead">Course Fee Installment List</div>
|
|
<div class="fee_table">
|
|
<table id="tbl" class="display table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<th>Sl.No</th>
|
|
<th>Course Name</th>
|
|
<th>Amount</th>
|
|
<th>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<b>Payment option</b>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<b>Due Dates</b>
|
|
</div>
|
|
</div>
|
|
</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
foreach ($installments as $key => $value) {
|
|
$due_info = json_decode($value['due_amount_date']);
|
|
?>
|
|
|
|
<tr>
|
|
<td><?= $key + 1 ?></td>
|
|
<td><div class="name_width"><?= $value['course_name'] .'-'. $value['fees_name'] ?></div></td>
|
|
<td><?= $value['amount'] ?></td>
|
|
<td>
|
|
<?php foreach ($due_info as $index => $ele) {
|
|
$CI = &get_instance();
|
|
$CI->load->model('Admin_model');
|
|
$inst_info = $this->db->get_where('payment_types',array('id'=>$index))->row_array();
|
|
|
|
?>
|
|
<div class="row mb-2">
|
|
<div class="col-md-4">
|
|
<?= $inst_info['payment_type_name'] ?>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<?php
|
|
foreach ($ele as $key2 => $value2) { ?>
|
|
<span class="mr-1" style=" white-space: nowrap;"><?= $value2->due_date ?>,</span>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
</td>
|
|
|
|
<td><div class="sub_tabbtnsec">
|
|
<a href="<?php echo base_url(); ?>admin/ae-fee-installment/<?php echo $value["id"]; ?>">
|
|
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
|
|
</a>
|
|
<a data-toggle="modal" href="#deleteModal">
|
|
<div class="sub_delbtn" onclick = "installdel(<?php echo $value['id']; ?>)"><i class="fa fa-trash" aria-hidden="true"></i></div>
|
|
</a>
|
|
</div></td>
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
</div>
|
|
<div class="viewDoc delete-modal-wrap">
|
|
<div class="modal fade" id="deleteModal" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<div class="delete-modal">
|
|
|
|
<i class="far fa-times-circle"></i>
|
|
<input type = "hidden" id = "inid" />
|
|
<h4>Are you sure?</h4>
|
|
<p>Are you sure you want to delete this item?</p>
|
|
<div class="delete-modal-btn">
|
|
<button type="button" class="subject_addbtn subject_addbtn_red" onclick="deletedata($('#inid').val(), 'installment');">Delete</button>
|
|
<button type="button" class="subject_addbtn subject_addbtn_cancel" data-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
//table js
|
|
$('#tbl').DataTable( {
|
|
"lengthMenu": [[25,50, 100, 150, -1], [25,50, 100, 150, "All"]]
|
|
} );
|
|
//table js end
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
function installdel(icn){
|
|
$('#inid').val(icn);
|
|
}
|
|
function deletedata(id, table){
|
|
window.location.href = "<?php echo base_url(); ?>admin/delete_course_installment/" + id;
|
|
}
|
|
</script>
|