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

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

$userid=$_SESSION["userid"];
$due_date=$_POST["due_date"];
$month_name=$_POST["month_name"];
$month_period=$_POST["month_period"];
$id=$_POST["id"];
$portal_id=$_POST["portal_id"];
$mfee=$_POST["mfee"];
$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"];
$disfee=$_POST["disfee"];
$appno=$_POST["appno"];
$disc=$_POST["disc"];
$fine=0;
$feebal=$mfee + $bal;
$totalfee=$mfee + $fee1 + $fee2 + $fee3 + $fee4 + $fee5 + $fee6 - $disfee;
$sql = "update issueslip set 
due_date='$due_date', month_name='$month_name',  mfee='$feebal' , feedisc1='$feedisc1', fee1='$fee1', feedisc2='$feedisc2', fee2='$fee2', feedisc3='$feedisc3', fee3='$fee3', feedisc4='$feedisc4', fee4='$fee4', feedisc5='$feedisc5', fee5='$fee5', feedisc6='$feedisc6', fee6='$fee6', totalfee='$totalfee', month_period='$month_period', feebal='$feebal' , fee1bal='$fee1', fee2bal='$fee2', fee3bal='$fee3', fee4bal='$fee4', fee5bal='$fee5', fee6bal='$fee6', totalfeebal='$totalfee', disfee='$disfee', appno='$appno', ref='$disc' where id='$id'";
$conn->query($sql);

echo "Challan Edit Sucessfully";

?>
<a href="Print_Duplicate_Challan.php">Back</a>