fees status changes done
This commit is contained in:
parent
4c5073e39a
commit
e8117e1d6b
@ -261,6 +261,7 @@ class Fees_status_model extends CI_Model
|
|||||||
$this->db->where('STC.StudentID', $student['StudentID']);
|
$this->db->where('STC.StudentID', $student['StudentID']);
|
||||||
$this->db->where('SFP.StudentID', $student['StudentID']);
|
$this->db->where('SFP.StudentID', $student['StudentID']);
|
||||||
$this->db->where('SFP.IsActive','1');
|
$this->db->where('SFP.IsActive','1');
|
||||||
|
$this->db->where('US.BranchCode',$student['BranchCode']);
|
||||||
$this->db->order_by('SFP.ID', 'DESC');
|
$this->db->order_by('SFP.ID', 'DESC');
|
||||||
$getFeeDetails = $this->db->get();
|
$getFeeDetails = $this->db->get();
|
||||||
if($getFeeDetails->result()){
|
if($getFeeDetails->result()){
|
||||||
@ -372,6 +373,7 @@ class Fees_status_model extends CI_Model
|
|||||||
$this->db->where('SFS.StudentID', $student['StudentID']);
|
$this->db->where('SFS.StudentID', $student['StudentID']);
|
||||||
$this->db->where('STC.StudentID', $student['StudentID']);
|
$this->db->where('STC.StudentID', $student['StudentID']);
|
||||||
$this->db->where('SFP.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('SFP.IsActive','1');
|
||||||
$this->db->where_in('SFS.FeesType', $serachArray);
|
$this->db->where_in('SFS.FeesType', $serachArray);
|
||||||
$this->db->order_by('SFP.ID', 'DESC');
|
$this->db->order_by('SFP.ID', 'DESC');
|
||||||
@ -1379,6 +1381,9 @@ class Fees_status_model extends CI_Model
|
|||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function updateFeesStatusInCallTrack($studentID=null,$courseID=null){
|
public function updateFeesStatusInCallTrack($studentID=null,$courseID=null){
|
||||||
|
// get student details
|
||||||
|
$studentDetails = $this->studentInfoForFeesStatus($studentID,$courseID);
|
||||||
|
|
||||||
$now = new DateTime();
|
$now = new DateTime();
|
||||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||||
$currentDate = new DateTime(date("d-m-Y"));
|
$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->from(PICK_LIST_DETAILS.' as PLD');
|
||||||
$this->db->where('PLD.ListName','PENDING');
|
$this->db->where('PLD.ListName','PENDING');
|
||||||
$this->db->where('PLD.IsActive','1');
|
$this->db->where('PLD.IsActive','1');
|
||||||
|
$this->db->where('PLD.BranchCode',$studentDetails->BranchID);
|
||||||
$checkStatus=$this->db->get()->last_row();
|
$checkStatus=$this->db->get()->last_row();
|
||||||
if($checkStatus){
|
if($checkStatus){
|
||||||
|
|
||||||
|
|
||||||
$studentDetails = $this->studentInfoForFeesStatus($studentID,$courseID);
|
|
||||||
|
|
||||||
if($studentDetails){
|
if($studentDetails){
|
||||||
$arrayDetails['MobileNumber']=$studentDetails->MobileNumber;
|
$arrayDetails['MobileNumber']=$studentDetails->MobileNumber;
|
||||||
$arrayDetails['LeadName']=$studentDetails->Firstname;
|
$arrayDetails['LeadName']=$studentDetails->Firstname;
|
||||||
@ -1426,6 +1430,7 @@ class Fees_status_model extends CI_Model
|
|||||||
$this->db->select('ActivityID,ActivityName');
|
$this->db->select('ActivityID,ActivityName');
|
||||||
$this->db->like('ActivityName', 'Fees', 'after');
|
$this->db->like('ActivityName', 'Fees', 'after');
|
||||||
$this->db->where('IsActive', '1');
|
$this->db->where('IsActive', '1');
|
||||||
|
$this->db->where('BranchCode', $studentDetails->BranchID);
|
||||||
$activityDetails=$this->db->get(ACTIVITY)->last_row();
|
$activityDetails=$this->db->get(ACTIVITY)->last_row();
|
||||||
if($activityDetails){
|
if($activityDetails){
|
||||||
|
|
||||||
@ -1581,7 +1586,11 @@ class Fees_status_model extends CI_Model
|
|||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function studentInfoForFeesStatus($studentID=null,$courseID=null){
|
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->select('ST.Firstname,ST.MobileNumber,US.UniversityName,CU.CourseName,STC.BranchID');
|
||||||
$this->db->from(STUDENTCOURSE.' as STC');
|
$this->db->from(STUDENTCOURSE.' as STC');
|
||||||
$this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID');
|
$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->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID');
|
||||||
$this->db->where('ST.StudentID',$studentID);
|
$this->db->where('ST.StudentID',$studentID);
|
||||||
$this->db->where('STC.CourseID',$courseID);
|
$this->db->where('STC.CourseID',$courseID);
|
||||||
|
$this->db->where('US.BranchCode IN('. $subQuery.')', NULL, FALSE);
|
||||||
$leadDet=$this->db->get()->last_row();
|
$leadDet=$this->db->get()->last_row();
|
||||||
if($leadDet){
|
if($leadDet){
|
||||||
return $leadDet;
|
return $leadDet;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user