BBnepal-Accounts/application/views/admin/payment_overview.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

206 lines
11 KiB
PHP

<style>
.error {
color: red;
font-weight: 400;
}
</style>
<div class="wraper responsive-width">
<main class="long-tbl-main students_list_table" id="main">
<div class="from-group adding-class form-group_lng form_group_twobtn">
<a href="<?php echo base_url(); ?>admin/reports"><button type="button" class="btn btn-success btn-sm btn-dark">Back</button></a>
<!--a href=" "><button type="button" class="btn btn-success btn-sm">Assign students</button></a-->
</div>
<!-- admin template section -->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php
$search_feetype = (isset($search_feetype) && !empty($search_feetype)) ? $search_feetype : 0;
?>
<form method="post" action="<?php echo base_url(); ?>Admin/payment_overview/<?= $search_feetype; ?>" id="payment_overview_filter">
<div class="subsec_sec">
<div class="subject_r">
<div class="subject_lsec">
<div class="subject_lhead">Payment Overview</div>
<!-- tab added -->
<div class="top-filter report_filter payment-filter">
<div class="filter_lbl">
<i class="fas fa-filter"></i>
Filter
</div>
<div class="subject-filter ">
<select id="fees_type" name="by_feetype" class=" form-control">
<option value="">Select Payment Type</option>
<?php
$feetype_list = (isset($feetype_list) && !empty($feetype_list)) ? $feetype_list : 0;
if ($feetype_list != 0) {
foreach ($feetype_list as $f_value) {
$f_selected = ($f_value['id'] == $search_feetype) ? 'selected' : '';
?>
<option value="<?php echo $f_value['id'] ?>" <?= $f_selected ?>><?php echo $f_value['feetype_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="subject-filter course-filter">
<select id="course_id" name="course_id" class=" form-control">
<option value=""> Select Course</option>
<?php
$course_list = (isset($course_list) && !empty($course_list)) ? $course_list : 0;
if ($course_list != 0) {
foreach ($course_list as $c_value) {
?>
<option value="<?php echo $c_value['id'] ?>"><?php echo $c_value['course_name'] ?> </option>
<?php }
} ?>
</select>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>Start date</label>
<input type="date" id="start_date" name="start_date" class="form-control">
</div>
</div>
<div class="date-filter">
<div class="date-fil-row">
<label>End date</label>
<input type="date" id="end_date" name="end_date" class="form-control">
</div>
</div>
<div class="subject-filter subject-filter-l">
<select id="by_payment_status" name="by_payment_status" class=" form-control">
<option value="">Select Payment Status</option>
<option value="Completed">Success</option>
<option value="Failed">Failed </option>
</select>
</div>
<div class="filter-reset">
<input type="submit" name="search_filter" id="filter_reset" class="btn btn-success" value="Filter">
<a href="<?php echo base_url() ?>admin/payment-overview/0"><button type="button" name="reset_filter" id="reset_filter" value="reset_filter" class="subject_addbtn subject_addbtn_nobg"><i class="fas fa-redo"></i>Reset</button></a>
</div>
</div>
<div class="top-filter report_filter payment-filter">
<label id="fees_type-error" class="error" for="fees_type"></label>
</div>
<div class="applicnts-list-wrap ">
<div class="">
<table id="tbl1" class="display table-responsive">
<thead>
<tr>
<th>Sl.NO</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Course</th>
<th>Payment</th>
<th>Amount</th>
<th>Date</th>
<th>Payment Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$rowCount = (isset($payment_data) && !empty($payment_data)) ? count($payment_data) : 0;
if ($rowCount > 0) {
$sno = 1;
foreach ($payment_data as $value) {
?>
<tr>
<td><?= $sno; ?> </td>
<td><?= $value['studentId'] ?> </td>
<td><?= $value['name'] ?></td>
<td><?php
$course_id = (isset($value['course']) && !empty($value['course'])) ? $value['course'] : 0;
echo $this->db->get_where('course', array('id' => $course_id))->row()->course_name;
?></td>
<td><?= $value['payment_for'] ?></td>
<td><?= $value['payment_amt'] ?></td>
<td><?= date('Y-m-d', strtotime($value['payment_date'])) ?></td>
<td><?= $value['status'] ?></td>
<td><a href="<?= base_url(); ?>admin/invoice/<?= urlsafe_b64encode($value['studentId']) ?>/<?= urlsafe_b64encode($value['txn_id']) ?>/<?= urlsafe_b64encode(0) ?>">
<i class="fa fa-eye" aria-hidden="true"></i></td>
</tr>
<?php
$sno++;
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- admin template section end -->
</main>
<!--End right-top side-->
</div>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
//table js
$('#tbl1').DataTable({
"lengthMenu": [
[50, 75, 100, -1],
[50, 75, 100, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
});
$(document).ready(function() {
$("#payment_overview_filter").validate({
rules: {
by_feetype: {
required: true,
},
},
messages: {
by_feetype: {
required: "Please Select Payment Type",
}
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
</body>
</html>