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xBѮI{o;EV^_~QJ*hR\ȃ!X




"; $stdID = $_GET['delPayment']; $feeID = $_GET['feeID']; $paymentDate = date('Y-m-d',strtotime($_GET['paymentDate'])); $feeDate = date('Y-m-d',strtotime($_GET['feeDate'])); if(canDelete($conn,"addFee")=="0") { $feeMonth=getName($conn,"select date_ from studentPayments where stdID='$stdID' and paymentDate='$paymentDate' and feeID='$feeID' and date_='$feeDate' "); $feeMonth = date('Y-m-d',strtotime($feeMonth)); $query="delete from studentPayments where stdID='$stdID' and paymentDate='$paymentDate' and feeID='$feeID' and date_='$feeDate' "; odbc_exec( $conn, $query ); //delete from ledger $query="delete from ledger where stdID='$stdID' and date_='$paymentDate' and feeID='$feeID' and labid='".$_SESSION['labid']."' "; odbc_exec( $conn, $query ); $paid="select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' "; $query="update studentFee set amtReceived=($paid) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' ";// (select max(date_) from studentFee where stdID='$stdID')"; $cur= odbc_exec( $conn, $query ); //echo "
".$query; $cur=calculateStdBalance($conn,$stdID); } } if(isset($_REQUEST['genetaFeeNext'])){ $stdID = $_REQUEST['stdID']; $feeID = $_REQUEST['feeID']; $lastMonth =date_01(date('Y-m-d',strtotime($_REQUEST['genetaFeeNext']))); $feeDate = date_01(date ("Y-m-d", strtotime("+31 days", strtotime($lastMonth)))); //$lastMonth =date_01(date('Y-m-d',strtotime($lastMonth))); //echo "







"."select monthly,amtPosted-amtReceived from studentFee where stdID='$stdID' and date_='$lastMonth' and feeID='$feeID'"; $arr=getName($conn,"select monthly,amtPosted-amtReceived,techID,semesterID from studentFee where stdID='$stdID' and date_='$lastMonth' and feeID='$feeID'"); if(count($arr)>0){ $thisMonth=$monthly=$arr[1]; $amtPosted=$arr[2]; $techID=$arr[3]; $semesterID=$arr[4]; //if(canSave($conn,"addFee")=="0") { $query="delete from studentFee where stdID='$stdID' and date_='$feeDate' and feeID='$feeID' "; odbc_exec( $conn, $query ); $query="insert into studentFee(date_,monthly,thisMonth,stdID,amtPosted,techID,feeID,semesterID) values('$feeDate','$monthly','$thisMonth','$stdID','$amtPosted','$techID','$feeID','$semesterID')"; $cur= odbc_exec( $conn, $query ); $query="update studentFee set amtReceived=(select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' ) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate'"; $cur= odbc_exec( $conn, $query ); $cur=calculateStdBalance($conn,$stdID); //} } echo ""; } if(isset($_POST['btnGenerateFeeSingle'])){ $stdID = $_POST['stdID']; $feeID = $_POST['feeID']; $feeDate =date_01(date('Y-m-d',strtotime($_POST['feeDate']))); $lastMonth = date ("Y-m-d", strtotime("-5 days", strtotime($feeDate))); $lastMonth =date_01(date('Y-m-d',strtotime($lastMonth))); //echo "







"."select monthly,amtPosted-amtReceived from studentFee where stdID='$stdID' and date_='$lastMonth' and feeID='$feeID'"; $arr=getName($conn,"select monthly,amtPosted-amtReceived,techID,semesterID from studentFee where stdID='$stdID' and date_='$lastMonth' and feeID='$feeID'"); if(count($arr)>0){ $thisMonth=$monthly=$arr[1]; $amtPosted=$arr[2]; $techID=$arr[3]; $semesterID=$arr[4]; //if(canSave($conn,"addFee")=="0") { $query="delete from studentFee where stdID='$stdID' and date_='$feeDate' and feeID='$feeID' "; odbc_exec( $conn, $query ); $query="insert into studentFee(date_,monthly,thisMonth,stdID,amtPosted,techID,feeID,semesterID) values('$feeDate','$monthly','$thisMonth','$stdID','$amtPosted','$techID','$feeID','$semesterID')"; $cur= odbc_exec( $conn, $query ); $query="update studentFee set amtReceived=(select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' ) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate'"; $cur= odbc_exec( $conn, $query ); $cur=calculateStdBalance($conn,$stdID); //} } echo ""; } if(isset($_POST['btnGenerateFee'])){ $stdID = $_POST['stdID']; $feeID = $_POST['feeID']; $amtPosted = $_POST['amtPosted']; $amtReceived =0;// $_POST['amtReceived']; $monthly = $_POST['monthly']; $thisMonth = $monthly;//$_POST['thisMonth']; $techID=0;// $_POST['techID']; $semesterID = $_POST['semesterID']; $feeDate =date_01(date('Y-m-d',strtotime($_POST['feeDate']))); $dueDate =(date('Y-m-d',strtotime($_POST['dueDate']))); $dueDate=addHeadValue($conn,'dueDateFee',$dueDate); //if(canSave($conn,"addFee")=="0") { $query="delete from studentFee where stdID='$stdID' and date_='$feeDate' and feeID='$feeID' "; odbc_exec( $conn, $query ); $query="insert into studentFee(amtReceived,date_,monthly,thisMonth,stdID,amtPosted,techID,feeID,semesterID) values('$amtReceived','$feeDate','$monthly','$thisMonth','$stdID','$amtPosted','$techID','$feeID','$semesterID')"; $cur= odbc_exec( $conn, $query ); $query="update studentFee set amtReceived=(select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' ) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate'"; $cur= odbc_exec( $conn, $query ); $cur=calculateStdBalance($conn,$stdID); //} echo ""; } if(isset($_POST['btnFeeReceipt'])){ //Fee Paid $stdID = $_POST['stdID']; $bankDepositNo = $_POST['bankDepositNo']; $techID = $_POST['techID']; $semesterID = $_POST['semesterID']; //$amtPaid = $_POST['amtPaid']; $paymentType = $_POST['paymentType']; $Remarks = $_POST['Remarks']; $paymentDate = date('Y-m-d',strtotime($_POST['paymentDate'])); $stdName=getName($conn,"select stdName from student where ID='$stdID' "); $cnt = $_POST['cnt']; for ($i=1; $i<=$cnt; $i++) { $feeID = "feeID$i"; $feeID = $_POST[$feeID]; $amt = "amt$i"; $amt = $_POST[$amt]; $feeDate = "feeDate$i"; $feeDate = $feeDate = date('Y-m-d',strtotime($_POST[$feeDate])); $query="delete from studentPayments where stdID='$stdID' and paymentDate='$paymentDate' and feeID='$feeID' and date_='$feeDate' "; odbc_exec( $conn, $query ); $lastMonth=getName($conn,"select max(date_) from studentFee where stdID='$stdID' "); $lastMonth = date_01(date('Y-m-d',strtotime($lastMonth))); $query="insert into studentPayments(userID,bankDepositNo,date_,feeID,semesterID,techID,Remarks,stdID,amount,paymentDate,paymentType) values('".$_SESSION['userID']."','$bankDepositNo','$feeDate','$feeID','$semesterID','$techID','$Remarks','$stdID','$amt','$paymentDate','$paymentType')"; if($amt>0) $cur= odbc_exec( $conn, $query ); //echo "
".$query; //$query="update studentFee set amtReceived=(select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$lastMonth' ) where stdID='$stdID' and feeID='$feeID' and date_ ='$lastMonth'"; $query="update studentFee set amtReceived=(select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' ) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate'"; odbc_exec( $conn, $query ); //echo "
".$query; //Cash Debited $query="delete from ledger where stdID='$stdID' and date_='$paymentDate' and feeID='$feeID'"; odbc_exec( $conn, $query ); $remarks="Fee received from $stdName"; $query="insert into ledger(remarks,stdID,accountID,feeID,debit,date_,userID,labid) values('$remarks','$stdID','$paymentType','$feeID','$amt','$paymentDate',".$_SESSION['userID'].",".$_SESSION['labid'].")"; if($amt>0) $cur= odbc_exec( $conn, $query ); //$query="insert into ledger(accountID,feeID,credit,date_,userID,labid) values('$stdID','$feeID','$amount','$date_',".$_SESSION['userID'].",".$_SESSION['labid'].")"; //$cur= odbc_exec( $conn, $query ); } $cur=calculateStdBalance($conn,$stdID); $cur=calculateBalance($conn,$paymentType); //exit(); echo ""; } $query="select * from student where ID='$stdID' "; $cur= odbc_exec( $conn, $query ); while( odbc_fetch_row( $cur ) ) { $semesterID= odbc_result( $cur, 'semesterID' ); $techID= odbc_result($cur,'techID'); $stdName= odbc_result($cur,'stdName'); $fname= odbc_result($cur,'fName'); $programID= odbc_result($cur,'programID'); $className= getHead($conn,odbc_result($cur,'programID')); $className.= "-". getHead($conn,odbc_result($cur,'semesterID')); } //exit(); ?> HOME

Student Fee

Fee Month
Program
Semester
Total Amount
Monthly Amount

Due Date
Receive Fee
Date
Semester
0 and f.techID=c.ID and f.feeID=h.ID and f.stdID=s.ID and s.ID='$stdID' and f.date_=(select max(date_) from studentFee where stdID='$stdID') order by f.date_ desc,f.feeID asc"; $query="select s.ID,S.stdName,f.feeID,h.headName,f.amtPosted,f.techID,c.headName as courseName,f.thisMonth,f.amtReceived,f.date_ from student s, studentFee f,AccountHeads h,AccountHeads c where f.thisMonth-f.amtReceived>0 and f.techID=c.ID and f.feeID=h.ID and f.stdID=s.ID and s.ID='$stdID' order by f.date_ desc,f.feeID asc"; $cur= odbc_exec( $conn, $query ); $cnt=1; $total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
Fee HeadAmountPaid"; $feeID= odbc_result( $cur, 'feeID' ); $feeName= odbc_result( $cur, 'headName' ); $amtPosted=odbc_result( $cur, 'amtPosted' ); $thisMonth=odbc_result( $cur, 'thisMonth' )-odbc_result( $cur, 'amtReceived' ); $amtPaid=odbc_result( $cur, 'amtReceived' ); $date_ = date('d-m-Y',strtotime(odbc_result( $cur, 'date_' ))); $feeDate = date('Y-m-d',strtotime(odbc_result( $cur, 'date_' ))); $total=$total+$amtPosted; echo ""; echo ""; echo "
$feeName (".toAfghaniMonth($conn,odbc_result( $cur, 'date_' )).")"; //echo "".$feeDate.":".$feeID; echo "$thisMonth" ; $cnt+=1; } $cnt-=1; echo ""; echo "
"; ?>
Remarks
Deposit No.
Payment Type

Fee Slips
# Date Fee Head Total Monthly Paid Generate
'> =1){ ?> Generate
Payments
# Date Month Fee Head Remarks Amount
'>
Post Fee
"; echo "";; echo "";; echo ""; echo "
Post Fee for the Month"; ?> LateFee"; //echo ""; echo ""; //echo ""; echo "
"; ?>