otp alert change and dashboard followup count change
This commit is contained in:
parent
d5e8d53e54
commit
ce81393e6d
@ -401,7 +401,7 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
|||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020' ";
|
and list.ListName like 'PENDING' and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' ";
|
||||||
$followupsCount=$this->db->query($sql);
|
$followupsCount=$this->db->query($sql);
|
||||||
$fcount = $followupsCount->result();
|
$fcount = $followupsCount->result();
|
||||||
$ssql = "select count(ltf.TrackingID) as count
|
$ssql = "select count(ltf.TrackingID) as count
|
||||||
@ -413,10 +413,10 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
|||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' and ltf.StatusName ='S020' ";
|
and list.ListName like 'PENDING' and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' ";
|
||||||
$sfollowupsCount=$this->db->query($ssql);
|
$sfollowupsCount=$this->db->query($ssql);
|
||||||
$sfcount = $sfollowupsCount->result();
|
$sfcount = $sfollowupsCount->result();
|
||||||
//print_r($sql);die();
|
//print_r($sql);die();and ltf.StatusName ='S020'
|
||||||
if (count($fcount) > 0) {
|
if (count($fcount) > 0) {
|
||||||
$results['fUpList'] = true;
|
$results['fUpList'] = true;
|
||||||
$results['fUp_data'] = $fcount;
|
$results['fUp_data'] = $fcount;
|
||||||
@ -438,10 +438,10 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
|||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020'";
|
and list.ListName like 'PENDING' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' ";
|
||||||
$followupsCount=$this->db->query($sql);
|
$followupsCount=$this->db->query($sql);
|
||||||
$fcount = $followupsCount->result();
|
$fcount = $followupsCount->result();
|
||||||
//to staff ltf.StatusName ='S020'
|
//and ltf.StatusName ='S020'
|
||||||
$ssql = "select count(ltf.TrackingID) as count
|
$ssql = "select count(ltf.TrackingID) as count
|
||||||
from T_Lead_Tracking_Followup as ltf
|
from T_Lead_Tracking_Followup as ltf
|
||||||
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
||||||
@ -451,7 +451,7 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
|||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' ";
|
and list.ListName like 'PENDING' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' ";
|
||||||
$sfollowupsCount=$this->db->query($ssql);
|
$sfollowupsCount=$this->db->query($ssql);
|
||||||
|
|
||||||
//print_r($sql);die();
|
//print_r($sql);die();
|
||||||
@ -797,7 +797,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
|||||||
$sql.= " group by bcode ";
|
$sql.= " group by bcode ";
|
||||||
|
|
||||||
$sql.=" ORDER BY BDate DESC";
|
$sql.=" ORDER BY BDate DESC";
|
||||||
// print_r($sql); die();
|
|
||||||
$ltd=$this->db->query($sql);
|
$ltd=$this->db->query($sql);
|
||||||
$tlead = $ltd->result();
|
$tlead = $ltd->result();
|
||||||
if (count($tlead) > 0) {
|
if (count($tlead) > 0) {
|
||||||
@ -837,6 +837,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
|||||||
$sltd=$this->db->query($ssql);
|
$sltd=$this->db->query($ssql);
|
||||||
$stlead = $sltd->result();
|
$stlead = $sltd->result();
|
||||||
|
|
||||||
|
|
||||||
if (count($tlead) > 0) {
|
if (count($tlead) > 0) {
|
||||||
$results['lList'] = true;
|
$results['lList'] = true;
|
||||||
$results['l_data'] = $tlead;
|
$results['l_data'] = $tlead;
|
||||||
@ -858,7 +859,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
|||||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
and list.ListName not like 'CLOSE' and list.ListName like 'PENDING' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020' ";
|
and list.ListName not like 'CLOSE' and list.ListName like 'PENDING' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and lt.CreatedBranch = '".$branchId."' ";
|
||||||
$ltd=$this->db->query($sql);
|
$ltd=$this->db->query($sql);
|
||||||
$tlead = $ltd->result();
|
$tlead = $ltd->result();
|
||||||
//To staff
|
//To staff
|
||||||
|
|||||||
@ -73,12 +73,12 @@ class Login_model extends CI_Model
|
|||||||
$result['details'] = $responseDetails;
|
$result['details'] = $responseDetails;
|
||||||
} else {
|
} else {
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->db->select('LO.MobileNumber, LO.ListCode, LO.ID,ST.BranchCode, ST.LoginAccess');
|
$this->db->select('LO.MobileNumber, LO.ListCode, LO.ID,ST.BranchCode, ST.LoginAccess');
|
||||||
@ -105,12 +105,12 @@ class Login_model extends CI_Model
|
|||||||
$result['details'] = $responseDetails;
|
$result['details'] = $responseDetails;
|
||||||
} else {
|
} else {
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,14 +177,14 @@ class Login_model extends CI_Model
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class Login_model extends CI_Model
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result['loginStatus'] = false;
|
$result['loginStatus'] = false;
|
||||||
$result['message'] = "Your login is de-activated.";
|
$result['message'] = "Please Enter The Correct OTP.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user