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

197 lines
7.7 KiB
PHP

<main class="common_margin" id="main">
<div class="main-wrap">
<div class="my-info-inner">
<div class="breadcrumb-section">
<ol class="breadcrumb breadcrumb-back">
<a href="<?php echo base_url()?>student/bus-facility">
<li class="breadcrumb-item"> Back</li>
</a>
</ol>
</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">&times;</span>
</button>
</div>
<?php } ?>
<?php
$paymet_types = array('Full Payment','Payable in 2 parts','Payable in 4 parts','Payable in 6 parts');
$totol_bus_fee=$fee_type_id=$mode_payment=$variable=$r_name=$stop_name=$name_route=$stop_name_de=$course_fee_id='';
if (isset($payment_details) && !empty($payment_details)) {
$totol_bus_fee = $payment_details['amount'];
$fee_type_id = $payment_details['fees_type'];
$mode_payment = $payment_details['installment_type_id'];
$course_fee_id = $payment_details['course_fee_id'];
$variable = json_decode($payment_details['payment_details']);
}
if (isset($route_name) && !empty($route_name)) {
$r_name = $route_name['route_id'];
$stop_name = $route_name['pick_up_id'];
$name_route = $route_name['route_name'];
$stop_name_de = $route_name['place_name'];
}
?>
<form id="bus_fee_form" method="POST" action="<?php echo base_url()?>student/bus-fee">
<div class="subject_lhead"> Choose your stop</div>
<div class="bus_wrap">
<div class="bus_form_wrap">
<div class="bus_formArea">
<div class="form-group assign_subject">
<label>Select Route </label>
<select class="form-control selectpicker" id="select_route" name="route_name">
<option value="<?php echo $r_name ?>"> <?php echo $name_route ?></option>
</select>
<label id="course_id-error" class="error" for="course_id"></label>
</div>
</div>
<div class="bus_formArea">
<div class="form-group assign_subject">
<label>Select Stop </label>
<select class="form-control selectpicker " id="select_stop" name="stop_name">
<option value="<?php echo $stop_name ?>"> <?php echo $stop_name_de ?></option>
</select>
<label id="course_id-error" class="error" for="course_id"></label>
</div>
</div>
</div>
<div class="bus_details">
<ul class="bus_details_list">
<li>
<label>Bus Fee Total:</label><span><?php echo $totol_bus_fee ?></span>
<input type="hidden" name="totol_bus_fee" value="<?php echo $totol_bus_fee ?>">
<input type="hidden" name="course_fee_id" id="course_fee_id" value="<?php echo $course_fee_id ?>">
<input type="hidden" name="fee_type_id" value="<?php echo $fee_type_id ?>">
</li>
<li>
<label>Payment Method:</label>
<span>
<div class="form-group assign_subject">
<select class="form-control selectpicker " id="Payment_mode" name="mode_payment">
<option value="<?php echo $mode_payment ?>"> <?php echo $paymet_types[$mode_payment - 1 ]; ?></option>
</select>
<label id="course_id-error" class="error" for="course_id"></label>
</div>
</span>
</li>
<li>
<label>Payment Dates:</label>
<span>
<ul class="sele-sub-opt-two" style="list-style-type: none;">
<?php if (isset($variable) && !empty($variable)) {
$flag =true;
foreach ($variable as $key => $value) {
$class = $value->payment_status == 'yes' ? 'green-pay' : '';
?>
<li>
<div class="outter-pay-wrap" style="display: flex;">
<div class="outter-check <?= $class ?>"><i class="fa fa-check"></i></div> <!-- green-pay -->
<p class="paid-para">Rs <?= $value->feeamount ?> </p>
</div>
<div class="paid-space"> Due date: <?= $value->due_date ?> </div>
<?php if($value->payment_status == 'no' && $flag) { ?>
<button type="submit" class="fees-pay-btn text-white" style="width: 75px;">Pay Now</button>
<input type="hidden" name="paying_amount" value="<?= $value->feeamount ?>">
<input type="hidden" name="due_amount_date" value="<?= $value->due_date ?>">
<?php $flag = false; } ?>
</li>
<?php }
} ?>
<!-- <li>
<div class="outter-pay-wrap" style="display: flex;">
<div class="outter-check green-pay">
<i class="fa fa-check"></i>
</div>
<p class="paid-para"> Rs '+ value['amount'] +'</p>
</div>
<div class="paid-space"> Paid on: '+ value['due_date'] +' </div>
<button class="fees-pay-btn text-white" type="submit">Pay Now</button>
</li>
<input type="hidden" name="paying_amount" value="'+ value['amount'] +'">
<input type="hidden" name="due_amount_date" value="'+ value['due_date'] +'"> -->
</ul>
</span>
</li>
</ul>
</div>
<!-- <div class="hostel_btn">
<button class="join-class-btn">Continue</button>
</div> -->
</div>
</form>
</div>
</div>
<style type="text/css">
.error{
color: red;
}
</style>
<script>
$("#bus_fee_form").validate({
ignore: ":hidden",
rules: {
route_name : {
required : true,
},
stop_name : {
required : true,
},
mode_payment:{
required:true
}
},
messages: {
route_name : {
required : 'Select Route Name'
},
stop_name : {
required : 'Please Select Stop Name'
},
mode_payment:{
required : 'Select Mode of Paymet'
},
},
submitHandler: function(form) {
form.submit();
}
});
</script>
</main>