call tracking duplication activity issues fixed
This commit is contained in:
parent
fd9b8eb9b3
commit
6fbe2bae97
@ -61,7 +61,7 @@ class Calltracking_model extends CI_Model {
|
||||
}
|
||||
// store lead,university and course details in comman array
|
||||
//$result_array['universityDetails']=$this->getUniversityDetails();
|
||||
$result_array['activityDetails']=$this->getActivityDetails();
|
||||
$result_array['activityDetails']=$this->getActivityDetails($mobileNumber);
|
||||
// $result_array['statusDetails']=$this->getStatus();
|
||||
$result_array['staffDetails']=$this->getStaff("1",$branchID,$userType,$requestedBy);
|
||||
return $result_array;
|
||||
@ -123,10 +123,34 @@ class Calltracking_model extends CI_Model {
|
||||
* created by kms
|
||||
* */
|
||||
|
||||
public function getActivityDetails()
|
||||
public function getActivityDetails($mobileNo=null)
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('LT.ActivityStatus,LT.ActivityStatus');
|
||||
$this->db->from(LEAD_DETAILS.' as LD');
|
||||
$this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID');
|
||||
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'LT.StatusCode = PLD.ListCode');
|
||||
$this->db->where('PLD.ListName !=','CLOSE');
|
||||
$this->db->where('LD.MobileNumber',$mobileNo);
|
||||
$getExistActivity=$this->db->get();
|
||||
$existArrayActivity=array();
|
||||
if($getExistActivity->result()){
|
||||
foreach ($getExistActivity->result() as $ActRow){
|
||||
|
||||
array_push($existArrayActivity,$ActRow->ActivityStatus);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$existArrayActivity=array();
|
||||
}
|
||||
|
||||
$this->db->select('ActivityID,ActivityName');
|
||||
$this->db->where('IsActive','1');
|
||||
if($existArrayActivity){
|
||||
$this->db->where_not_in('ActivityID',$existArrayActivity);
|
||||
}
|
||||
$this->db->order_by('ActivityID','ASC');
|
||||
$activity = $this->db->get(ACTIVITY);
|
||||
if($activity->result()){
|
||||
@ -149,6 +173,7 @@ class Calltracking_model extends CI_Model {
|
||||
$result_activity[]=$activity_array;
|
||||
|
||||
}
|
||||
|
||||
return $result_activity;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user