course details changes done
This commit is contained in:
parent
5fd3ecffe7
commit
ff9704f2b9
@ -155,11 +155,13 @@ class Fees_status_model extends CI_Model
|
||||
* */
|
||||
|
||||
public function existStudentFeesDetails($student=null){
|
||||
$this->db->select('SFS.FeesID,SFS.FeesType,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,ST.Firstname,CU.CourseName,CU.CourseID,CF.Sem_Year');
|
||||
$this->db->select('SFS.FeesID,SFS.FeesType,ifnull(SFS.CourseFees,0) as CourseFees,ifnull(SFS.STFOrWR,0) as STFOrWR,ifnull(SFS.Waiver,0) as Waiver,ifnull(SFS.Others,0) as Others,ST.Firstname,ST.MobileNumber,ST.Fathername,CU.CourseName,CU.CourseID,CF.Sem_Year,STC.EnrollmentID,US.UniversityName');
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(STUDENTS.' as ST', 'ST.StudentID = SFS.StudentID');
|
||||
$this->db->join(COURSE.' as CU', 'CU.CourseID = SFS.CourseID');
|
||||
$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType');
|
||||
$this->db->join(STUDENTCOURSE.' as STC', 'STC.CourseID = CU.CourseID');
|
||||
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID');
|
||||
$this->db->where('SFS.CourseID', $student['CourseID']);
|
||||
$this->db->where('SFS.StudentID', $student['StudentID']);
|
||||
$getFeeDetails = $this->db->get();
|
||||
@ -173,13 +175,25 @@ class Fees_status_model extends CI_Model
|
||||
$storePaidDetails['Others'] = $feeRow->Others;
|
||||
$storePaidDetails['PayableAmount'] = $feeRow->CourseFees+$feeRow->STFOrWR+$feeRow->Others-$feeRow->Waiver;
|
||||
$storePaidDetails['Firstname'] = $feeRow->Firstname;
|
||||
$storePaidDetails['MobileNumber'] = $feeRow->MobileNumber;
|
||||
$storePaidDetails['Fathername'] = $feeRow->Fathername;
|
||||
$storePaidDetails['EnrollmentID'] = $feeRow->EnrollmentID;
|
||||
$storePaidDetails['CourseName'] = $feeRow->CourseName;
|
||||
$storePaidDetails['UniversityName'] = $feeRow->UniversityName;
|
||||
$this->db->select('ifnull(SUM((BillAmount)),0) as PaidBillAmount');
|
||||
$this->db->where('FeesId',$feeRow->FeesID);
|
||||
$paidBillAmount = $this->db->get(STUDENTS_FEES_PAID)->result();
|
||||
$storePaidDetails['PaidBillAmount']=$paidBillAmount[0]->PaidBillAmount;
|
||||
if($paidBillAmount[0]->PaidBillAmount > $storePaidDetails['PayableAmount']){
|
||||
$storePaidDetails['BalanceAmount']=0;
|
||||
|
||||
}
|
||||
else{
|
||||
$storePaidDetails['BalanceAmount']=$storePaidDetails['PayableAmount'] - $paidBillAmount[0]->PaidBillAmount;
|
||||
}
|
||||
|
||||
// for get paid bill details
|
||||
$this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO');
|
||||
$this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,SessionID,ModeOfPayment');
|
||||
$this->db->where('FeesId',$feeRow->FeesID);
|
||||
$this->db->group_by('BillNO');
|
||||
$storePaidDetails['paidDetails']=$this->db->get(STUDENTS_FEES_PAID)->result();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user