<?php
//--Class ProgramFee--------------------------

include_once "clsbase_ProgramFee.php";

class 
ProgramFee extends base_ProgramFee{

function 
GetSumAmountByStIdAndAcYAndSe($xKey$yKey$zKey){
    
$this->SetQuery("select sum(amount) as num from ProgramFee where studentId='$xKey' and acadYear='$yKey' and semester='$zKey'");
    if (
$result=$this->GetResult()) {
        return 
$result['num'];
    }
}

function 
RSProgramFeeByStIdAndAcYAndSe($xKey$yKey$zKey){
    
$this->SetQuery("select * from ProgramFee where studentId='$xKey' and acadYear='$yKey' and semester='$zKey'");
}

function 
GetSumAmountByStIdAndAcYAndSeAndOutBudgetIsY($xKey$yKey$zKey){
    
$this->SetQuery("select sum(amount) as num from ProgramFee, Fee where studentId='$xKey' and acadYear='$yKey' and semester='$zKey' and ProgramFee.feeId=Fee.feeId and outBudget='Y'");
    if (
$result=$this->GetResult()) {
        return 
$result['num'];
    }
}

function 
GetSumAmountByStIdAndAcYAndSeAndOutBudgetIsN($xKey$yKey$zKey){
    
$this->SetQuery("select sum(amount) as num from ProgramFee, Fee where studentId='$xKey' and acadYear='$yKey' and semester='$zKey' and ProgramFee.feeId=Fee.feeId and outBudget='N'");
    if (
$result=$this->GetResult()) {
        return 
$result['num'];
    }
}

//--End class ProgramFee--
?>