student view model changed for waiver and ref bill
This commit is contained in:
parent
98a78ead9e
commit
cb2fa885fc
@ -123,6 +123,8 @@ class Studentview_model extends CI_Model
|
||||
* created by kms
|
||||
* */
|
||||
public function getStudentFeesDetails($studentID=null,$courseID=null){
|
||||
$serachArray=[WAIVER,REFERRAL];
|
||||
|
||||
$this->db->distinct();
|
||||
$this->db->select('SFS.FeesID,SFS.FeesType,SFS.RollNo,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,CF.Sem_Year,CF.FeesType as CourseFeesType,SM.SessionName,SM1.SessionName as ToSessionName,CF.ProgramType,BA.BatchName,BA.BatchDate');
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
@ -167,6 +169,22 @@ class Studentview_model extends CI_Model
|
||||
else{
|
||||
$storePaidDetails['BalanceAmount']=$storePaidDetails['PayableAmount'] - $paidBillAmount[0]->PaidBillAmount;
|
||||
}
|
||||
|
||||
// sepearte for student waiver and referral bill list
|
||||
$this->db->select('ifnull(SUM((BillAmount)),0) as StudentWaiverRefAmount');
|
||||
$this->db->where('FeesId',$feeRow->FeesID);
|
||||
$this->db->where_in('ModeOfPayment',$serachArray);
|
||||
$studentWaiverRefAmount = $this->db->get(STUDENTS_FEES_PAID)->result();
|
||||
|
||||
$storePaidDetails['StudentWaiverRefAmount']=$studentWaiverRefAmount[0]->StudentWaiverRefAmount;
|
||||
|
||||
$this->db->select('ifnull(SUM((BillAmount)),0) as StudentPaidAmount');
|
||||
$this->db->where('FeesId',$feeRow->FeesID);
|
||||
$this->db->where('ModeOfPayment !=',WAIVER);
|
||||
$this->db->where('ModeOfPayment !=',REFERRAL);
|
||||
$studentPaidAmount = $this->db->get(STUDENTS_FEES_PAID)->result();
|
||||
|
||||
$storePaidDetails['StudentPaidAmount']=$studentPaidAmount[0]->StudentPaidAmount;
|
||||
$storePaidDetails['BatchName'] = $feeRow->BatchName;
|
||||
$storePaidDetails['BatchDate'] = $feeRow->BatchDate;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user