From 093b82a47d7d01bcba63ab3218436d0475236fbd Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 23 Apr 2018 18:21:42 +0530 Subject: [PATCH] student fees changes done --- .../api/application/models/Fees_status_model.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index cac88233..4485ecdf 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -718,7 +718,6 @@ class Fees_status_model extends CI_Model * created by kms * */ public function getFeesStructureAssign($student=null){ - $this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year'); $this->db->where('CourseID',$student['CourseID']); $this->db->order_by('ProgramType'); @@ -773,7 +772,7 @@ class Fees_status_model extends CI_Model } - $batchDetails = $this->getBatchDetails($existData[0]->BatchCode,$student['CourseID'],$student['StudentID'],$row->ID); + $batchDetails = $this->getBatchDetails($existData[0]->BatchCode,$student['CourseID'],$student['StudentID'],$row->ID,$student['BranchCode']); if($batchDetails!=false){ $fetchData['batchDetails']=$batchDetails; } @@ -804,7 +803,7 @@ class Fees_status_model extends CI_Model $fetchData['PayableFees']=$row->FeesAmount; // for installment details $fetchData['InstallmentDetails']=""; - $batchDetails = $this->getBatchDetails('',$student['CourseID'],$student['StudentID'],''); + $batchDetails = $this->getBatchDetails('',$student['CourseID'],$student['StudentID'],'',$student['BranchCode']); if($batchDetails!=false){ $fetchData['batchDetails']=$batchDetails; } @@ -861,7 +860,7 @@ class Fees_status_model extends CI_Model * get batch details * created by kms * */ - public function getBatchDetails($batchCode=null,$courseID=null,$studentID=null,$feesType=null){ + public function getBatchDetails($batchCode=null,$courseID=null,$studentID=null,$feesType=null,$branchCode=null){ if($batchCode=='' OR $batchCode==null){ $this->db->select('BA.BatchCode,BA.BatchName,BA.BatchDate,BA.IsDefault,US.UniversityID,US.UniversityName,BA.IsActive'); $this->db->from(COURSE.' as CU'); @@ -870,6 +869,9 @@ class Fees_status_model extends CI_Model $this->db->order_by('BA.CreatedOn','DESC'); $this->db->where('CU.CourseID',$courseID); $this->db->where('BA.IsActive','1'); + $this->db->where('BA.BranchCode',$branchCode); + $this->db->where('US.BranchCode',$branchCode); + $batchDetails = $this->db->get(); if($batchDetails->result()){ @@ -892,6 +894,8 @@ class Fees_status_model extends CI_Model $this->db->where('CU.CourseID',$courseID); $this->db->where('STF.StudentID',$studentID); $this->db->where('STF.FeesType',$feesType); + $this->db->where('BA.BranchCode',$branchCode); + $this->db->where('US.BranchCode',$branchCode); $batchDetails = array(); /* $this->db->or_where('BA.IsActive','1'); @@ -1610,6 +1614,8 @@ class Fees_status_model extends CI_Model // $this->db->order_by('CU.CreatedOn','DESC'); $this->db->order_by('SM.SessionID','DESC'); $this->db->where('CU.CourseID',$details['CourseID']); + $this->db->where('US.BranchCode',$details['BranchCode']); + $this->db->where('SM.BranchCode',$details['BranchCode']); // $this->db->group_by('SM.SessionName','DESC'); $sessionDetails = $this->db->get(); if($sessionDetails->result()){