/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/promote_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 ='STUDY 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['study_fee'];
$study_paid_amount = 0;
}
?>
<button type="button" class="collaps" data-target="#collapseOne" data-toggle="collapse" onClick="change_button()" style="margin-top: 20px;" >Acadamic Year : <?= $row['academic_year']?> | Due Amount : Rs <?= $studydue_amount?> </button>
<div class="content1" style="background: color: #f5f5f5; display:none;" id="card1">
<div>
<div class="col-12" id="collapseOne">
<div style="display:inline-flex; padding: 10px 0 10px 30px; display: flex;">
<h6 class="">Actual Amount:<?= $row['study_actval_fee']?></h6><br><br><h6 class="">Total:Rs <?= $row['study_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="#demo123" style="margin-left: 10px; background-color:#2FEBB5;">Pay</button>
</div>
<div class="container">
<div id="demo123" class="collapse" >
<div class="col-12">
<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">Date</th>
<th scope="col">V.NO.</th>
<th scope="col">Paid By</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="datepicker5" value="<?= date('Y-m-d')?>" readonly></td>
<td><input type="text" class="form-control" id="study_promote_invoice" value="<?= $invoice_value?>" readonly ></td>
<td><input type="text" placeholder="Enter Paid By" class="form-control" id="study_promot_paid"></td>
<td><input type="text" placeholder="Enter Amount" class="form-control" id="study_promot_amount"></td>
<td></td>
<input type="hidden" value="<?= $row['study_fee']?>" id="study_promote_total">
<input type="hidden" id="studyPAdm" value="<?= $row['addmission_no']?>">
<input type="hidden" id="studyPclass" value="<?= $row['class']?>">
<input type="hidden" id="studyPyear" value="<?= $row['academic_year']?>">
<input type="hidden" id="pBranch" value="<?= $row['Branch']?>">
<td ><button class="button12" onclick="promote_study_amount()">Pay </button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div><br>
<?php
$select_study_data = executework("SELECT * FROM student_fee where yearOf = '".$row['academic_year']."' and admission_no = '".$row['addmission_no']."' and category ='STUDY FEE'");
?>
<div id="Study_Table_Data1"></div>
<div class="col-12" id="Study_Table_Data">
<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>
<th scope="col">Edit</th>
</tr>
</thead>
<tbody>
</tbody>
<?php
$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="pdf_genartion.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>
</div>
<?php
}
}
}
?>
<script>
$("#datepicker5").datepicker({
dateFormat: "yy-mm-dd",
type: 'datetime',
onClick: function() {
table.draw();
},
changeMonth: true,
changeYear: true
})
function change_button()
{
$('#card1').show();
// $('#card1').hide();
}
</script>
<script>
function promote_study_amount()
{
var session_name = $('#session_name').val();
var fee_date = $('#datepicker5').val();
var amount_data =$('#study_promot_amount').val();
var paid_by = $('#study_promot_paid').val();
var study_amount = $('#study_promote_total').val();
var invoice_value = $('#study_promote_invoice').val();
var AdmissionNo = $('#studyPAdm').val();
var PresentClass = $('#studyPclass').val();
var Academic_year = $('#studyPyear').val();
var Branch = $('#pBranch').val();
alert(study_amount);
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 : "study_payment.php",
data : {study_amount : study_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,session_name: session_name},
type : 'POST',
success : function(response) {
$('#Study_Table_Data').hide();
$('#Study_Table_Data1').html(response);
$('#study_promot_paid').val('');
$('#study_promot_amount').val('');
$('#studyerrmsg1').show();
$('#buserrmsg1').hide();
$('#additionalerrmsg1').hide();
$('#hostelerrmsg1').hide();
$('#bookserrmsg1').hide();
$('#remarkserrmsg1').hide();
$('#activityerrmsg1').hide();
}
});
$.ajax({
url : "study_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