Viewing file: clsEnrollFee.php (16.76 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
SetQuery("select studentId from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey' group by studentId");
}*/
function RSEnrollFeeByAcYAndStYAndSeAndPgIdAndNoPay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select studentId from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey' and balance=totalAmount group by studentId");
}
function GetSumTtAmtByStIdAndAcYAndStYAndSe($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(totalAmount) as num from EnrollFee where studentId='$wKey' and acadYear='$xKey' and studentYear='$yKey' and semester='$zKey'");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByStIdAndAcYAndStYAndSe($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where studentId='$wKey' and acadYear='$xKey' and studentYear='$yKey' and semester='$zKey'");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByStIdAndAcYAndStYAndSeAndNoPay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where studentId='$wKey' and acadYear='$xKey' and studentYear='$yKey' and semester='$zKey' and balance=totalAmount");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByStIdAndAcYAndStYAndSeAndTimePay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where studentId='$wKey' and acadYear='$xKey' and studentYear='$yKey' and semester='$zKey' and balance>0 and balanceGetResult()) {
return $result['num'];
}
}
function GetSumTtAmtByAcYAndStYAndSeAndPgId($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(totalAmount) as num from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey'");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumTtAmtByAcYAndSeAndPgIdAndAdYAndPay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(totalAmount) as num from EnrollFee e, StudentMaster s where acadYear='$wKey' and semester='$xKey' and e.programId='$yKey' and balance=0 and e.studentId=s.studentId and admitAcadYear='$zKey'");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumTtAmtByAcYAndSeAndPay($xKey, $yKey){
$this->SetQuery("select sum(totalAmount) as num from EnrollFee where acadYear='$xKey' and semester='$yKey' and balance=0");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByAcYAndStYAndSeAndPgId($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey'");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByAcYAndStYAndSeAndPgIdAndNoPay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey' and balance=totalAmount");
if ($result=$this->GetResult()) {
return $result['num'];
}
}
function GetSumBlByAcYAndStYAndSeAndPgIdAndTimePay($wKey, $xKey, $yKey, $zKey){
$this->SetQuery("select sum(balance) as num from EnrollFee where acadYear='$wKey' and studentYear='$xKey' and semester='$yKey' and programId='$zKey' and balance>0 and balanceGetResult()) {
return $result['num'];
}
}
function RSEnrollFeeByStIdAndAcYAndSe($xKey, $yKey, $zKey){
$this->SetQuery("select * from EnrollFee where studentId='$xKey' and acadYear='$yKey' and semester='$zKey'");
}
function CalFee($stId, $acY, $stY, $se, $pgId, $etId){
include_once "clsCommonFeeTP.php";
include_once "clsCommonFee.php";
include_once "clsFee.php";
include_once "clsProgramFeeTP.php";
include_once "clsProgramFee.php";
include_once "clsStudentDom.php";
include_once "clsDomFeeTP.php";
include_once "clsCourseFeeTP.php";
include_once "clsCourseFee.php";
include_once "clsEnrollItem.php";
$oCft = new CommonFeeTP();
$oCf = new CommonFee();
$oCf2 = new CommonFee();
$oFe = new Fee();
$oPft = new ProgramFeeTP();
$oPf = new ProgramFee();
$oPf2 = new ProgramFee();
$oSd = new StudentDom();
$oDft = new DomFeeTP();
$oCoft = new CourseFeeTP();
$oCof = new CourseFee();
$oEi = new EnrollItem();
/*$this->RSEnrollFeeByStIdAndAcYAndSe($stId, $acY, $se);
// Not found
if($this->GetRecord() == 0) {
// Insert EnrollFee
$this->AddNew();
$this->enrollFeeId=$this->GetNextCode();
$this->studentId=$stId;
$this->acadYear=$acY;
$this->studentYear=$stY;
$this->semester=$se;
$this->programId=$pgId;
$this->totalAmount=$totalAmount;
$this->balance=$balance;
$this->refNo=$acY.$se.$stCode;
$this->createDateTime=date('Y-m-d H:i:s');
$this->createUserId=$createUserId;
$this->updateDateTime=date('Y-m-d H:i:s');
$this->updateUserId=$updateUserId;
$this->Save();
}*/
// ---------- CommonFee ----------
$oCf->RSCommonFeeByStIdAndAcYAndSe($stId, $acY, $se);
while($oCf->GetRecord()) {
$oCf2->SearchByKey($stId, $acY, $se, $oCf->feeId);
$oCf2->GetRecord();
$oCf2->Delete();
}
$sumCommonFee = 0;
$oCft->RSCommonFeeTPByAcYAndSeAndIsNotDom($acY, $se);
while($oCft->GetRecord()) {
$oFe->SearchByKey($oCft->feeId);
$oFe->GetRecord();
if(($oFe->feePayType==1 && $stY==1) bool(false)
|