/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/fee_payment1.php
<?php
include("include/include.php");
if($_POST['type']==1)
{
$select_study_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['academic_year']."' and admission_no = '".$_POST['addmission_no']."' order by id desc limit 1");
if(mysqli_num_rows($select_study_data)>0){
$row_study = mysqli_fetch_array($select_study_data);
$dueamount = $row_study['due_amount']-$_POST['amount_data'];
$paid_amount = $row_study['paid_amount']+$_POST['amount_data'];
}
else
{
$dueamount = $_POST['study_amount_data']-$_POST['amount_data'];
$paid_amount = $_POST['amount_data'];
}
$insert_study = executeworkins("insert into student_fee (class,rollno,branch,studytotal_amount,syllabus,due_amount,paid_amount,fee_date,paid_studyAmount,create_date,admission_no,yearOf,category) values ('".$_POST['class_data']."','','','".$_POST['study_amount_data']."','','".$dueamount."','".$paid_amount."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".$_POST['amount_data']."','".date('Y-m-d H:i:s')."','".$_POST['addmission_no']."', '".$_POST['academic_year']."','".$_POST['category']."') ");
if(!empty($insert_study)){
$addNo = executework("SELECT * FROM daybook_credt order by id desc LIMIT 1");
$addNoData = mysqli_fetch_array($addNo);
$year = substr($_POST['academic_year'],5);
$code = $_POST['Branch'];
$addmissNo = $addNoData['VocherNumber'];
if($addmissNo > 0)
{
$value = (int) $addmissNo + 1;
$val = sprintf('%03d', $value);
}
else {
$value = "1";
$val = sprintf('%03d', $value);
}
$insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber) values ('".$_POST['academic_year']."','','".$_POST['category']."','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','$val') ");
}
echo $insert_study;
}
if($_POST['type']==2)
{
$select_study = executework("SELECT * FROM student_fee where admission_no='".$_POST['addmission_no']."' and yearOf = '".$_POST['academic_year']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Total Amount</th>
<th>Due Amount</th>
<th>Paid Amount</th>
<th>Payment Date</th>
</tr>';
$i=1;
while($studyData = mysqli_fetch_array($select_study)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.$studyData['studytotal_amount'].'</td>
<td>'.$studyData['due_amount'].'</td>
<td>'.$studyData['paid_studyAmount'].'</td>
<td>'.date('M-d-Y',strtotime($studyData['fee_date'])).'</td>
</tr>';
$i++;
}
echo $output;
}
if($_POST['type']==3)
{
$select_study_data = executework("SELECT * FROM bus_payment where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['academic_year']."' and admission_no = '".$_POST['addmission_no']."' order by id desc limit 1");
if(mysqli_num_rows($select_study_data)>0){
$row_study = mysqli_fetch_array($select_study_data);
$dueamount = $row_study['due_amount']-$_POST['amount_data'];
$paid_amount = $row_study['paid_amount']+$_POST['amount_data'];
}
else
{
$dueamount = $_POST['study_amount_data']-$_POST['amount_data'];
$paid_amount = $_POST['amount_data'];
}
$insert_study = executeworkins("insert into bus_payment (class,rollno,branch,bustotal_amount,syllabus,due_amount,paid_amount,fee_date,paid_busAmount,create_date,admission_no,yearOf,category) values ('".$_POST['class_data']."','','','".$_POST['bus_amount_data']."','','".$dueamount."','".$paid_amount."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".$_POST['Busamount_data']."','".date('Y-m-d H:i:s')."','".$_POST['addmission_no']."', '".$_POST['academic_year']."','".$_POST['category']."') ");
if(!empty($insert_study)){
$addNo = executework("SELECT * FROM daybook_credt order by id desc LIMIT 1");
$addNoData = mysqli_fetch_array($addNo);
$year = substr($_POST['academic_year'],5);
$code = $_POST['Branch'];
$addmissNo = $addNoData['VocherNumber'];
if($addmissNo > 0)
{
$value = (int) $addmissNo + 1;
$val = sprintf('%03d', $value);
}
else {
$value = "1";
$val = sprintf('%03d', $value);
}
$insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber) values ('".$_POST['academic_year']."','','".$_POST['category']."','".$_POST['Busamount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','$val') ");
}
echo $insert_study;
}
if($_POST['type']==4)
{
$select_study = executework("SELECT * FROM bus_payment where admission_no='".$_POST['addmission_no']."' and yearOf = '".$_POST['academic_year']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Total Amount</th>
<th>Due Amount</th>
<th>Paid Amount</th>
<th>Payment Date</th>
</tr>';
$i=1;
while($studyData = mysqli_fetch_array($select_study)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.$studyData['bustotal_amount'].'</td>
<td>'.$studyData['due_amount'].'</td>
<td>'.$studyData['paid_busAmount'].'</td>
<td>'.date('M-d-Y',strtotime($studyData['fee_date'])).'</td>
</tr>';
$i++;
}
echo $output;
}
if($_POST['type']==5)
{
$select_study_data = executework("SELECT * FROM hostel_payment where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['academic_year']."' and admission_no = '".$_POST['addmission_no']."' order by id desc limit 1");
if(mysqli_num_rows($select_study_data)>0){
$row_study = mysqli_fetch_array($select_study_data);
$dueamount = $row_study['due_amount']-$_POST['amount_data'];
$paid_amount = $row_study['paid_amount']+$_POST['amount_data'];
}
else
{
$dueamount = $_POST['study_amount_data']-$_POST['amount_data'];
$paid_amount = $_POST['amount_data'];
}
$insert_study = executeworkins("insert into hostel_payment (class,rollno,branch,hostel_total,syllabus,due_amount,paid_amount,fee_date,paid_hostelAmount,create_date,admission_no,yearOf,category) values ('".$_POST['class_data']."','','','".$_POST['Hostel_amount_data']."','','".$dueamount."','".$paid_amount."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".$_POST['amount_data']."','".date('Y-m-d H:i:s')."','".$_POST['addmission_no']."', '".$_POST['academic_year']."','".$_POST['category']."') ");
if(!empty($insert_study)){
$addNo = executework("SELECT * FROM daybook_credt order by id desc LIMIT 1");
$addNoData = mysqli_fetch_array($addNo);
$year = substr($_POST['academic_year'],5);
$code = $_POST['Branch'];
$addmissNo = $addNoData['VocherNumber'];
if($addmissNo > 0)
{
$value = (int) $addmissNo + 1;
$val = sprintf('%03d', $value);
}
else {
$value = "1";
$val = sprintf('%03d', $value);
}
$insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber) values ('".$_POST['academic_year']."','','".$_POST['category']."','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','$val') ");
}
echo $insert_study;
}
if($_POST['type']==6)
{
$select_study = executework("SELECT * FROM hostel_payment where admission_no='".$_POST['addmission_no']."' and yearOf = '".$_POST['academic_year']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Total Amount</th>
<th>Due Amount</th>
<th>Paid Amount</th>
<th>Payment Date</th>
</tr>';
$i=1;
while($studyData = mysqli_fetch_array($select_study)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.$studyData['hostel_total'].'</td>
<td>'.$studyData['due_amount'].'</td>
<td>'.$studyData['paid_hostelAmount'].'</td>
<td>'.date('M-d-Y',strtotime($studyData['fee_date'])).'</td>
</tr>';
$i++;
}
echo $output;
}
if($_POST['type']==7)
{
$select_study_data = executework("SELECT * FROM additional_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['academic_year']."' and admission_no = '".$_POST['addmission_no']."' order by id desc limit 1");
if(mysqli_num_rows($select_study_data)>0){
$row_study = mysqli_fetch_array($select_study_data);
$dueamount = $row_study['due_amount']-$_POST['amount_data'];
$paid_amount = $row_study['paid_amount']+$_POST['amount_data'];
}
else
{
$dueamount = $_POST['study_amount_data']-$_POST['amount_data'];
$paid_amount = $_POST['amount_data'];
}
$insert_study = executeworkins("insert into additional_fee (class,rollno,branch,addtotal_amount,syllabus,due_amount,paid_amount,fee_date,paid_addAmount,create_date,admission_no,yearOf,category) values ('".$_POST['class_data']."','','','".$_POST['Hostel_amount_data']."','','".$dueamount."','".$paid_amount."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".$_POST['amount_data']."','".date('Y-m-d H:i:s')."','".$_POST['addmission_no']."', '".$_POST['academic_year']."','".$_POST['category']."') ");
if(!empty($insert_study)){
$addNo = executework("SELECT * FROM daybook_credt order by id desc LIMIT 1");
$addNoData = mysqli_fetch_array($addNo);
$year = substr($_POST['academic_year'],5);
$code = $_POST['Branch'];
$addmissNo = $addNoData['VocherNumber'];
if($addmissNo > 0)
{
$value = (int) $addmissNo + 1;
$val = sprintf('%03d', $value);
}
else {
$value = "1";
$val = sprintf('%03d', $value);
}
$insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber) values ('".$_POST['academic_year']."','','".$_POST['category']."','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','$val') ");
}
echo $insert_study;
}
if($_POST['type']==8)
{
$select_study = executework("SELECT * FROM additional_fee where admission_no='".$_POST['addmission_no']."' and yearOf = '".$_POST['academic_year']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Total Amount</th>
<th>Due Amount</th>
<th>Paid Amount</th>
<th>Payment Date</th>
</tr>';
$i=1;
while($studyData = mysqli_fetch_array($select_study)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.$studyData['addtotal_amount'].'</td>
<td>'.$studyData['due_amount'].'</td>
<td>'.$studyData['paid_addAmount'].'</td>
<td>'.date('M-d-Y',strtotime($studyData['fee_date'])).'</td>
</tr>';
$i++;
}
echo $output;
}
?>
@LwBee Strong Bypass
Upload File
Create New File