From 1b6eecf99b8d9ac43c79dfc4bda6ba163ebdc87c Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 19 Apr 2018 15:24:04 +0530 Subject: [PATCH] student view changes done --- Apollo/api/application/models/Studentview_model.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 2072dba1..9b9def61 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -142,6 +142,7 @@ class Studentview_model extends CI_Model $this->db->join(BATCH.' as BA', 'BA.BatchCode = SFS.BatchCode'); $this->db->where('SFS.CourseID', $courseID); $this->db->where('SFS.StudentID', $studentID); + $this->db->where('SFP.IsActive', '1'); $this->db->order_by('SFS.FeesID', 'ASC'); $getFeeDetails = $this->db->get(); if($getFeeDetails->result()){ @@ -167,6 +168,7 @@ class Studentview_model extends CI_Model $this->db->select('ifnull(SUM((BillAmount)),0) as PaidBillAmount'); $this->db->where('FeesId',$feeRow->FeesID); + $this->db->where('IsActive', '1'); $paidBillAmount = $this->db->get(STUDENTS_FEES_PAID)->result(); $storePaidDetails['PaidBillAmount']=$paidBillAmount[0]->PaidBillAmount; if($paidBillAmount[0]->PaidBillAmount > $storePaidDetails['PayableAmount']){ @@ -189,6 +191,7 @@ class Studentview_model extends CI_Model $this->db->where('FeesId',$feeRow->FeesID); $this->db->where('ModeOfPayment !=',WAIVER); $this->db->where('ModeOfPayment !=',REFERRAL); + $this->db->where('IsActive', '1'); $studentPaidAmount = $this->db->get(STUDENTS_FEES_PAID)->result(); $storePaidDetails['StudentPaidAmount']=$studentPaidAmount[0]->StudentPaidAmount; @@ -203,6 +206,7 @@ class Studentview_model extends CI_Model $this->db->join(LOGIN.' as LO','LO.ID = SFP.CreatedBy'); $this->db->join(STAFF.' as STF','STF.StaffID = LO.StaffID'); $this->db->where('SFP.FeesId',$feeRow->FeesID); + $this->db->where('SFP.IsActive', '1'); $this->db->order_by('SFP.ID',"ASC"); $this->db->group_by('SFP.BillNO'); $storePaidDetails['paidDetails']=$this->db->get()->result(); @@ -251,6 +255,7 @@ class Studentview_model extends CI_Model //$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType'); $this->db->where('SFS.CourseID', $courseID); $this->db->where('SFS.StudentID', $studentID); + $this->db->where('SFP.IsActive', '1'); $this->db->where_in('SFS.FeesType', $serachArray); $this->db->order_by('SFS.FeesID', 'ASC'); $getFeeDetails = $this->db->get(); @@ -270,6 +275,7 @@ class Studentview_model extends CI_Model $this->db->select('ifnull(SUM((BillAmount)),0) as PaidBillAmount'); $this->db->where('FeesId',$feeRow->FeesID); + $this->db->where('IsActive', '1'); $paidBillAmount = $this->db->get(STUDENTS_FEES_PAID)->result(); $storePaidDetails['PaidBillAmount']=$paidBillAmount[0]->PaidBillAmount; if($paidBillAmount[0]->PaidBillAmount > $storePaidDetails['PayableAmount']){ @@ -289,6 +295,7 @@ class Studentview_model extends CI_Model $this->db->join(LOGIN.' as LO','LO.ID = SFP.CreatedBy'); $this->db->join(STAFF.' as STF','STF.StaffID = LO.StaffID'); $this->db->where('SFP.FeesId',$feeRow->FeesID); + $this->db->where('SFP.IsActive', '1'); $this->db->order_by('SFP.ID',"ASC"); $this->db->group_by('SFP.BillNO'); $storePaidDetails['paidDetails']=$this->db->get()->result();