/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/bus_payment.php
<?php
include('include/include.php');
if($_POST['type']==1)
{
$select_bus_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['Academic_year']."' and admission_no = '".$_POST['AdmissionNo']."' and category ='BUS FEE' order by id desc limit 1");
$invoicevalue = substr($_POST['invoice_value'],5);
if(mysqli_num_rows($select_bus_data)>0){
$row_bus = mysqli_fetch_array($select_bus_data);
$dueamount = $row_bus['study_due_amount']-$_POST['amount_data'];
$paid_amount = $row_bus['study_paid_amount']+$_POST['amount_data'];
}
else
{
$dueamount = $_POST['bus_amount']-$_POST['amount_data'];
$paid_amount = $_POST['amount_data'];
}
$insert_study = executeworkins("insert into student_fee (class,branch,studytotal_amount,study_due_amount,study_paid_amount,fee_date,study_daily_amount,create_date,admission_no,yearOf,category,invoice,paid_by) values ('".$_POST['PresentClass']."','".$_POST['Branch']."','".$_POST['bus_amount']."','".$dueamount."','".$paid_amount."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".$_POST['amount_data']."','".date('Y-m-d H:i:s')."','".$_POST['AdmissionNo']."', '".$_POST['Academic_year']."','BUS FEE','". $invoicevalue."','".$_POST['paid_by']."') ");
if(!empty($insert_study)){
$daybook_cre_deb = executework("insert into daybook_cre_deb (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,type,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','BUS FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
}
?>
<div class="container">
<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">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>
<?php
if($_POST['session_name'] == 'admin'){
?>
<th scope="col">Edit</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
$select_study = executework("SELECT * FROM student_fee where admission_no='".$_POST['AdmissionNo']."' and yearOf = '".$_POST['Academic_year']."' and category ='BUS FEE'");
$i=1;
while($study_row = mysqli_fetch_array($select_study)){
$inv_value = $study_row['branch'].'-'.$study_row['invoice'];
?>
<tr>
<th scope="row"><?= $i?></th>
<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>
<?php
if($_POST['session_name'] == 'admin'){
?>
<td><a href="fee_paid_edit.php?edit=<?= $study_row['id']?>" style="text-decoration: none;" class="button12" target="_blank">Edit</a></td>
<?php
}
?>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php
}
?>
@LwBee Strong Bypass
Upload File
Create New File