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uRZs,;$4p(CyoHQusq!O~\;N yƹ-pêNeK,2>=Z\]oiۑ ”V4Ibp0+GbhJ<býq nl 0gMrsf#ݚ.SWsO ^dz7y44˜:̜8]$-+A 5[5}V>hZf["~G/^-Oso{ed_vW[j}f~Ƽ"n]X5CT^a.]Pǎ8S!n#eWDS#r攚VB^涰Ϝ(Pu( ׋5Bˋ)SZ6lm43mvyY,.a!7hupdte studentFee set programID='$programID' where stdID='$stdID' and programID is null "; odbc_exec($conn,"update studentFee set programID='$programID' where stdID='$stdID' and programID is null "); odbc_exec($conn,"update studentFee set sectionID='$sectionID' where stdID='$stdID' and sectionID is null "); $query="delete from studentFee where stdID='$stdID' and date_='$feeDate' and feeID='$feeID' "; odbc_exec( $conn, $query ); $query="insert into studentFee(programID,sectionID,labid,amtReceived,date_,monthly,thisMonth,stdID,amtPosted,techID,feeID,semesterID) values('$programID','$sectionID','".$_SESSION['labid']."','$amtReceived','$feeDate','$monthly','$thisMonth','$stdID','$amtPosted','$techID','$feeID','$semesterID')"; $cur= odbc_exec( $conn, $query ); $recived="select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' "; $disc="select isnull(sum(discount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' "; $query="update studentFee set discount=($disc),amtReceived=($recived) where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate'"; $cur= odbc_exec( $conn, $query ); $cur=calculateStdBalance($conn,$stdID); echo ""; exit(); } } $discount="0"; if(isset($_POST['btnFeeReceipt'])){ //Fee Paid //echo "





"; $stdID = $_POST['stdID']; $bankDepositNo = $_POST['bankDepositNo']; $techID =0;// $_POST['techID']; $semesterID =0;// $_POST['semesterID']; //$amtPaid = $_POST['amtPaid']; $paymentType = $_POST['paymentType']; $Remarks = $_POST['Remarks']; $paymentDate = date('Y-m-d',strtotime($_POST['paymentDate'])); $cnt = $_POST['cnt']; if(canSave($conn,"addFeeNew")=="0"){ for ($i=1; $i<=$cnt; $i++) { $feeDate = "feeDate$i"; $feeDate = (date('Y-m-01',strtotime( $_POST[$feeDate]))); $feeID = "feeID$i"; $feeID = $_POST[$feeID]; $amt = "amt$i"; $amt = $_POST[$amt]; $discount = "discount$i"; $discount = $_POST[$discount]; if($amt=="") $amt=0; $query="delete from studentPayments where labid='".$_SESSION['labid']."' and date_='$feeDate' and stdID='$stdID' and paymentDate='$paymentDate' and feeID='$feeID' "; odbc_exec( $conn, $query ); //$lastMonth=getName($conn,"select max(date_) from studentFee where stdID='$stdID' "); $lastMonth = $feeDate ;// date_01(date('Y-m-d',strtotime($lastMonth))); $query="insert into studentPayments(discount,labid,userID,bankDepositNo,date_,feeID,semesterID,techID,Remarks,stdID,amount,paymentDate,paymentType) values('$discount','".$_SESSION['labid']."','".$_SESSION['userID']."','$bankDepositNo','$lastMonth','$feeID','$semesterID','$techID','$Remarks','$stdID','$amt','$paymentDate','$paymentType')"; if($amt>0) $cur= odbc_exec( $conn, $query ); //echo "
".$query; $recived="select isnull(sum(amount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' "; $disc="select isnull(sum(discount),0) from studentPayments where stdID='$stdID' and feeID='$feeID' and date_ ='$feeDate' "; $query="update studentFee set discount=($disc),amtReceived=($recived) where stdID='$stdID' and feeID='$feeID' and date_ ='$lastMonth'"; $cur= odbc_exec( $conn, $query ); //echo "
".$query; } $arr=getName($conn,"select programID,sectionID from student where ID='$stdID' "); $programID=$arr[1]; $sectionID=$arr[2]; odbc_exec($conn,"updte studentPayments set programID='$programID' where stdID='$stdID' and programID is null "); odbc_exec($conn,"updte studentPayments set sectionID='$sectionID' where stdID='$stdID' and sectionID is null "); $cur=calculateStdBalance($conn,$stdID); echo ""; } } if($stdID=="") $stdID=0; $className=$stdName=""; $query="select * from student where ID='$stdID' and labid='".$_SESSION['labid']."' "; $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,'sectionID')); } //exit(); ?> Fee
"; echo ""; echo "
Student ID:".$arr[4]; echo "
Father Name:".$arr[1]; echo "
Address: ".$arr[2]; echo "
Contacts: ".$arr[3]; echo "
Balance: ".$arr[6]; echo "
"; echo ""; echo "".$arr[5]." "; echo ""; ?>
Fee Month
'>
Amount

"; $query="select ID,stdName,fname,programID,sectionID,balance from student where recordType='Std' and status=0 and labid='".$_SESSION['labid']."' and contacts<>'' and ID<>'$stdID' and contacts=(select contacts from student where ID='$stdID' and labid='".$_SESSION['labid']."') "; $cur= odbc_exec( $conn, $query ); echo "
Other Family Members"; echo ""; while( odbc_fetch_row( $cur ) ){ echo "
".odbc_result($cur,'stdName').""; echo "".odbc_result($cur,'fname'); echo "".getHead($conn,odbc_result($cur,'programID')); echo "".getHead($conn,odbc_result($cur,'sectionID')); echo "".odbc_result($cur,'balance'); } echo "
"; ?>
Fee Receipt
(f.amtReceived) and f.techID=c.ID and f.feeID=h.ID and f.stdID=s.ID and s.ID='$stdID' order by f.date_ asc,f.feeID asc"; $query="select f.discount,s.ID,S.stdName,f.feeID,h.headName,f.amtPosted,f.techID,f.thisMonth,f.amtReceived,f.date_ from student s, studentFee f,AccountHeads h where (f.amtPosted-f.discount)<>(f.amtReceived) and f.feeID=h.ID and f.stdID=s.ID and s.ID='$stdID' order by f.date_ asc,f.feeID asc"; $cur= odbc_exec( $conn, $query ); $cnt=1; $totalpaid=$total=0; while( odbc_fetch_row( $cur ) ) { if ($cnt==1) echo "
MonthFee HeadAmountPaidBalanceDiscount"; $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'); //$month = date('M-y',strtotime(odbc_result( $cur, 'date_' ))); $month = toAfghaniMonth($conn,odbc_result( $cur, 'date_' )); $feeDate = date('Y-m-d',strtotime(odbc_result( $cur, 'date_' ))); $total=$total+$amtPosted; $totalpaid+=odbc_result($cur,'amtReceived' ); echo ""; echo ""; echo "
$month$feeName"; echo "".odbc_result($cur,'amtPosted'); echo "".odbc_result($cur,'amtReceived'); //echo "".odbc_result($cur,'amtReceived'); echo "" ; echo "" ; $cnt+=1; } $cnt-=1; echo ""; if($cnt>1){ echo "
Total$total$totalpaid".($total-$totalpaid); } echo "
"; ?>
Date
Deposit No.
Remarks
Payment Type



Add Fee Slip Instructions
Fee Slips
# Month Fee Head Amout Disc Paid
Payments
# Date Fee Head Remarks Amout Disc