This commit is contained in:
dineshkumarkannan 2018-04-24 13:03:15 +05:30
commit e8a61e6a43
2 changed files with 15 additions and 3 deletions

View File

@ -91,6 +91,7 @@ class Fees_Status_Controller extends REST_Controller {
$student['requestedBy'] = $this->post('requestedtBy');
$student['CourseID'] = $this->post('courseID');
$student['StudentID'] = $this->post('studentID');
$student['BranchCode'] = $this->post('branchCode');
$getStudentFeesDetails = $this->Fees_model->getStudentFeesStructure($student);
if ($getStudentFeesDetails)
{
@ -244,6 +245,7 @@ class Fees_Status_Controller extends REST_Controller {
$details['CreatedBy'] = $this->post('createdBy');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$details['BatchCode'] = $this->post('batchCode');
$details['BranchCode'] = $this->post('branchCode');
$jsonInstallmenData = $this->post('installmentItems');

View File

@ -261,6 +261,7 @@ class Fees_status_model extends CI_Model
$this->db->where('STC.StudentID', $student['StudentID']);
$this->db->where('SFP.StudentID', $student['StudentID']);
$this->db->where('SFP.IsActive','1');
$this->db->where('US.BranchCode',$student['BranchCode']);
$this->db->order_by('SFP.ID', 'DESC');
$getFeeDetails = $this->db->get();
if($getFeeDetails->result()){
@ -372,6 +373,7 @@ class Fees_status_model extends CI_Model
$this->db->where('SFS.StudentID', $student['StudentID']);
$this->db->where('STC.StudentID', $student['StudentID']);
$this->db->where('SFP.StudentID', $student['StudentID']);
$this->db->where('US.BranchCode',$student['BranchCode']);
$this->db->where('SFP.IsActive','1');
$this->db->where_in('SFS.FeesType', $serachArray);
$this->db->order_by('SFP.ID', 'DESC');
@ -1379,6 +1381,9 @@ class Fees_status_model extends CI_Model
* created by kms
* */
public function updateFeesStatusInCallTrack($studentID=null,$courseID=null){
// get student details
$studentDetails = $this->studentInfoForFeesStatus($studentID,$courseID);
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$currentDate = new DateTime(date("d-m-Y"));
@ -1389,12 +1394,11 @@ class Fees_status_model extends CI_Model
$this->db->from(PICK_LIST_DETAILS.' as PLD');
$this->db->where('PLD.ListName','PENDING');
$this->db->where('PLD.IsActive','1');
$this->db->where('PLD.BranchCode',$studentDetails->BranchID);
$checkStatus=$this->db->get()->last_row();
if($checkStatus){
$studentDetails = $this->studentInfoForFeesStatus($studentID,$courseID);
if($studentDetails){
$arrayDetails['MobileNumber']=$studentDetails->MobileNumber;
$arrayDetails['LeadName']=$studentDetails->Firstname;
@ -1426,6 +1430,7 @@ class Fees_status_model extends CI_Model
$this->db->select('ActivityID,ActivityName');
$this->db->like('ActivityName', 'Fees', 'after');
$this->db->where('IsActive', '1');
$this->db->where('BranchCode', $studentDetails->BranchID);
$activityDetails=$this->db->get(ACTIVITY)->last_row();
if($activityDetails){
@ -1581,7 +1586,11 @@ class Fees_status_model extends CI_Model
* created by kms
* */
public function studentInfoForFeesStatus($studentID=null,$courseID=null){
// this sub query for avoid university duplicate id
$this->db->select('BranchID')->from(STUDENTCOURSE);
$this->db->where('StudentID',$studentID);
$subQuery = $this->db->get_compiled_select();
// subquery end
$this->db->select('ST.Firstname,ST.MobileNumber,US.UniversityName,CU.CourseName,STC.BranchID');
$this->db->from(STUDENTCOURSE.' as STC');
$this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID');
@ -1589,6 +1598,7 @@ class Fees_status_model extends CI_Model
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID');
$this->db->where('ST.StudentID',$studentID);
$this->db->where('STC.CourseID',$courseID);
$this->db->where('US.BranchCode IN('. $subQuery.')', NULL, FALSE);
$leadDet=$this->db->get()->last_row();
if($leadDet){
return $leadDet;