course details changes done
This commit is contained in:
parent
faef62c1bb
commit
e6739ee444
@ -665,6 +665,24 @@ class Fees_status_model extends CI_Model
|
|||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function defaultCourseFeesDetails($student=null){
|
public function defaultCourseFeesDetails($student=null){
|
||||||
|
|
||||||
|
// check student fees paid details for get default course fees
|
||||||
|
|
||||||
|
$this->db->select('ifnull(SUM((SFS.CourseFees)),0) as CourseFees');
|
||||||
|
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||||
|
$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType');
|
||||||
|
$this->db->where('SFS.CourseID',$student['CourseID']);
|
||||||
|
$this->db->where('SFS.StudentID',$student['StudentID']);
|
||||||
|
$feesAmount = $this->db->get()->result();
|
||||||
|
|
||||||
|
$this->db->select('ifnull(SUM((SFP.BillAmount)),0) as PaidAmount');
|
||||||
|
$this->db->from(STUDENTS_FEES_PAID.' as SFP');
|
||||||
|
$this->db->join(STUDENTS_FEES_STATUS.' as SFS', 'SFS.FeesID = SFP.FeesId');
|
||||||
|
$this->db->where('SFS.CourseID',$student['CourseID']);
|
||||||
|
$this->db->where('SFS.StudentID',$student['StudentID']);
|
||||||
|
$paidAmount = $this->db->get()->result();
|
||||||
|
|
||||||
|
if($feesAmount[0]->CourseFees <= $paidAmount[0]->PaidAmount){
|
||||||
// get default course fees
|
// get default course fees
|
||||||
$this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees');
|
$this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees');
|
||||||
$this->db->where('CourseID',$student['CourseID']);
|
$this->db->where('CourseID',$student['CourseID']);
|
||||||
@ -746,6 +764,11 @@ class Fees_status_model extends CI_Model
|
|||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user