/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/buspromote_year.php
<?php
include('include/include.php');
if($_POST['type']==1){
$select_study = executework("select invoice from student_fee order by id desc limit 1 ");
if(mysqli_num_rows($select_study)>0)
{
$srow = mysqli_fetch_array($select_study);
$invoice = $srow['invoice'];
$value = (int) $invoice + 1;
$val = sprintf('%06d', $value);
$invoice_value = $_POST['Branch'].'-'.$val;
}
else
{
$value = "1";
$val = sprintf('%06d', $value);
$invoice_value = $_POST['Branch'].'-'.$val;
}
$select_study = executework("SELECT * FROM promote_class where addmission_no = '".$_POST['AdmissionNo']."'");
if(mysqli_num_rows($select_study)>0){
while($row = mysqli_fetch_array($select_study)){
$select_studyData = executework("select * from student_fee where admission_no ='".$row['addmission_no']."' and category ='BUS FEE' and yearOf = '".$row['academic_year']."' order by id desc limit 1");
if(mysqli_num_rows($select_studyData)>0)
{
$dataRow = mysqli_fetch_array($select_studyData);
$studydue_amount = $dataRow['study_due_amount'];
$study_paid_amount = $dataRow['study_paid_amount'];
}
else
{
$studydue_amount = $row['bus_fee'];
$study_paid_amount = 0;
}
?>
<button type="button" class="collaps" data-target="#collapseOne1" data-toggle="collapse1" onClick="change_button1()" style="margin-top: 20px;" >Acadamic Year : Rs <?= $row['academic_year']?> | Due Amount : Rs <?= $studydue_amount?> </button>
<div class="content1" style="background: color: #f5f5f5; display:none;" id="card12">
<div class="col-12" id="collapseOne1">
<div style="display:inline-flex; padding: 10px 0 10px 30px; display: flex;">
<h6 class="">Actual Amount:<?= $row['bus_actval_fee']?></h6><br><br> <h6 class="">Total:Rs <?= $row['bus_fee']?></h6><br> <h6 style="margin-left: 20px;">Paid:Rs <?= $study_paid_amount?></h6> <br><h6 style="margin-left: 20px;">Due:Rs <?= $studydue_amount?></h6>
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo46" style="margin-left: 10px; background-color:#2FEBB5;">Pay</button>
</div>
<div class="container">
<div id="demo46" class="collapse" >
<div class="col-12">
<div class=" rounded h-100 p-4" style="background-color:#f5f5f5; border: 0.1px solid gray;">
<h3 style="text-align: center; color:green; display:none;" id="buserrmsg1">Study Amount Paid Successfully</h3>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">V.NO.</th>
<th scope="col">Payee</th>
<th scope="col">Amount</th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="form-control" id="datepicker6" value="<?= date('Y-m-d')?>" readonly></td>
<td><input type="text" class="form-control" id="bus_promote_invoice" value="<?= $invoice_value?>" readonly ></td>
<td><input type="text" placeholder="Enter Paid By" class="form-control" id="bus_promot_paid"></td>
<td><input type="text" placeholder="Enter Amount" class="form-control" id="bus_promot_amount"></td>
<td></td>
<input type="hidden" value="<?= $row['bus_fee']?>" id="bus_promote_total">
<td ><button class="button12" onclick="promote_bus_amount()">Pay </button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div><br>
<div id="Bus_Table_Data1"></div>
<div class="col-12" id="BusTableData">
<div class=" rounded h-100 p-4" style="background-color:#f5f5f5; border: 0.1px solid gray;">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">S.NO</th>
<th scope="col">Date</th>
<th scope="col">V.NO</th>
<th scope="col">Payee</th>
<th scope="col">Amount</th>
<th scope="col">Print</th>
</tr>
</thead>
<tbody>
<?php
$select_study_data = executework("SELECT * FROM student_fee where yearOf = '".$row['academic_year']."' and admission_no = '".$row['addmission_no']."' and category ='BUS FEE'");
$i=1;
while($study_row = mysqli_fetch_array($select_study_data)){
$inv_value = $study_row['branch'].'-'.$study_row['invoice'];
?>
<tr>
<td scope="row"><?= $i?></td>
<td><?= date('Y-m-d',strtotime($study_row['fee_date']))?></td>
<td><?= $inv_value?></td>
<td><?= strtoupper($study_row['paid_by'])?></td>
<td><?= $study_row['study_daily_amount']?></td>
<td><a href="bus_pdf.php?id=<?= $study_row['id']?>" style="text-decoration: none;" class="button12" target="_blank">Print</a></td>
<td><a href="fee_paid_edit.php?edit=<?= $study_row['id']?>" style="text-decoration: none;" class="button12" target="_blank">Edit</a></td>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
}
?>
<script>
$("#datepicker6").datepicker({
dateFormat: "yy-mm-dd",
type: 'datetime',
onClick: function() {
table.draw();
},
changeMonth: true,
changeYear: true
})
function change_button1()
{
$('#card12').show();
// $('#card1').hide();
}
</script>
<script>
function promote_bus_amount()
{
var fee_date = $('#datepicker6').val();
var amount_data =$('#bus_promot_amount').val();
var paid_by = $('#bus_promot_paid').val();
var bus_amount = $('#bus_promote_total').val();
var invoice_value = $('#bus_promote_invoice').val();
var AdmissionNo = $('#studyPAdm').val();
var PresentClass = $('#studyPclass').val();
var Academic_year = $('#studyPyear').val();
var Branch = $('#pBranch').val();
if(fee_date == '')
{
swal('Please Select Date');
return false;
}
else if(paid_by == '')
{
swal('Please Enter Paid By');
return false;
}
else if(amount_data == '')
{
swal('Please Enter Amount');
return false;
}
else
{
if(AdmissionNo !=''){
$.ajax({
url : "bus_payment.php",
data : {bus_amount : bus_amount,type:1,amount_data:amount_data,AdmissionNo : AdmissionNo,PresentClass : PresentClass,fee_date : fee_date,Academic_year : Academic_year,paid_by : paid_by,Branch : Branch,invoice_value : invoice_value},
type : 'POST',
success : function(response) {
$('#Bus_Table_Data').hide();
$('#BusTableData1').html(response);
$('#bus_promot_paid').val('');
$('#bus_promot_amount').val('');
$('#studyerrmsg1').hide();
$('#buserrmsg1').show();
$('#additionalerrmsg1').hide();
$('#hostelerrmsg1').hide();
$('#bookserrmsg1').hide();
$('#remarkserrmsg1').hide();
$('#activityerrmsg1').hide();
}
});
$.ajax({
url : "bus_payment1.php",
data : {Branch : Branch,type: 1,invoice_value : invoice_value},
type : 'POST',
success : function(response1) {
$('#study_promote_invoice').val(response1);
$('#books_promote_invoice').val(response1);
$('#hostel_promote_invoice').val(response1);
$('#add_promote_invoice').val(response1);
$('#bus_promote_invoice').val(response1);
// $('#remarkserrmsg').hide();
// $('#activityerrmsg').hide();
}
});
}
}
}
</script>
@LwBee Strong Bypass
Upload File
Create New File