<?php 
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");

$userid=$_SESSION["userid"];
$fee_period=$_POST["fee_period"];
$fam_no=$_POST["fam_no"];
$tmfee=$_POST["tmfee"];
$all_name=$_POST["all_name"];
$fname=$_POST["fname"];
$all_class_name=$_POST["all_class_name"];
$month_name_fine=$_POST["month_name_fine"];
$fine_value=$_POST["fine_value"];
$month_period=$_POST["month_period"];
$class_name=$_POST["class_name"];
$issue_date=$_POST["issue_date"];
$due_date=$_POST["due_date"];
$month_name=$_POST["month_name"];

$feedisc1=$_POST["feedisc1"];
$fee1=$_POST["fee1"];
$feedisc2=$_POST["feedisc2"];
$fee2=$_POST["fee2"];
$feedisc3=$_POST["feedisc3"];
$fee3=$_POST["fee3"];
$feedisc4=$_POST["feedisc4"];
$fee4=$_POST["fee4"];
$feedisc5=$_POST["feedisc5"];
$fee5=$_POST["fee5"];
$feedisc6=$_POST["feedisc6"];

$fee6=$_POST["fee6"];



 
  
 
  $totalmfee=  $tmfee;
  $tfee1=   $fee1;
  $tfee2=   $fee2;
  $tfee3=   $fee3; 
  $tfee4=   $fee4;
  $tfee5=   $fee5;
  $tfee6=   $fee6; 
  




  
$tfeebal1=$tfee1 ;
$tfeebal2=$tfee2 ;
$tfeebal3=$tfee3;
$tfeebal4=$tfee4 ;
$tfeebal5=$tfee5 ;
$tfeebal6=$tfee6 ;

$netfee=$totalmfee * $fee_period;
$feebal=$netfee + $bal + $curfine;
$totalfee=$netfee + $bal + $tfeebal1 + $tfeebal2 + $tfeebal3 + $tfeebal4 + $tfeebal5 + $tfeebal6 + $curfine;

$sql = "Insert into issueslip (id,date,due_date,month_name,adm_no,portal_id,std_name,fname,class_name,cls_sec,cell_1,mfee,bal,feedisc1,fee1,feedisc2,fee2,feedisc3,fee3,feedisc4,fee4,feedisc5,fee5,feedisc6,fee6,fine,totalfee,status,user_id,month_period,feebal,fee1bal,fee2bal,fee3bal,fee4bal,fee5bal,fee6bal,totalfeebal,barcode,app_file1,status1,status2,status3,status4,status5,status6,feestatus) values (null,'$issue_date','$due_date','$month_name','$fam_no','$std_rollno','$all_name','$fname','$all_class_name','$cls_sec','$cell_1','$netfee','$bal','$feedisc1','$fee1','$feedisc2','$fee2','$feedisc3','$fee3','$feedisc4','$fee4','$feedisc5','$fee5','$feedisc6','$fee6','$fine','$totalfee','unpaid','$userid','$month_period','$netfee','$fee1','$fee2','$fee3','$fee4','$fee5','$fee6','$totalfee','$fam_no','$app_file1','unpaid','unpaid','unpaid','unpaid','unpaid','unpaid','$feestatus')";
$conn->query($sql);


header("location:Open_Student_Family.php");

?>
