dashboard issue
This commit is contained in:
parent
9f0775f499
commit
aca26c6361
@ -76,13 +76,17 @@ $query_builder = TRUE;
|
||||
$db['default'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => 'apollodec.com',
|
||||
'username' => 'apollod4_DEV',
|
||||
'password' => 'apollo1234',
|
||||
'database' => 'apollod4_ApolloDECDev',
|
||||
'username' => 'apollod4_DEV',
|
||||
'password' => 'apollo1234',
|
||||
'database' => 'apollod4_ApolloDECDev',
|
||||
|
||||
// 'username' => 'apollod4_SIT',
|
||||
// 'password' => 'apollosit1234',
|
||||
// 'database' => 'apollod4_ApolloDECNEWSIT',
|
||||
// 'username' => 'apollod4_SIT',
|
||||
// 'password' => 'apollosit1234',
|
||||
// 'database' => 'apollod4_ApolloDECNEWSIT',
|
||||
|
||||
// 'username' => 'apollod4_PROD',
|
||||
// 'password' => 'approd!2017',
|
||||
// 'database' =>'apollod4_ApolloDECNEWPROD',
|
||||
|
||||
'dbdriver' => 'mysqli',
|
||||
'dbprefix' => '',
|
||||
|
||||
@ -401,7 +401,7 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
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 STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020' ";
|
||||
$followupsCount=$this->db->query($sql);
|
||||
$fcount = $followupsCount->result();
|
||||
$ssql = "select count(ltf.TrackingID) as count
|
||||
@ -413,9 +413,10 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
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 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' ";
|
||||
$sfollowupsCount=$this->db->query($ssql);
|
||||
$sfcount = $sfollowupsCount->result();
|
||||
//print_r($sql);die();
|
||||
if (count($fcount) > 0) {
|
||||
$results['fUpList'] = true;
|
||||
$results['fUp_data'] = $fcount;
|
||||
@ -437,7 +438,7 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
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 month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and ltf.IsActive = 1 and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020'";
|
||||
$followupsCount=$this->db->query($sql);
|
||||
$fcount = $followupsCount->result();
|
||||
//to staff ltf.StatusName ='S020'
|
||||
@ -453,7 +454,7 @@ public function leadCountMonth($branchId = null, $requestedBy = null){
|
||||
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);
|
||||
|
||||
//print_r($sql);die();
|
||||
//print_r($sql);die();
|
||||
|
||||
$sfcount = $sfollowupsCount->result();
|
||||
if (count($fcount) > 0) {
|
||||
@ -819,7 +820,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
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 lt.CreatedBranch = '".$branchId."' ";
|
||||
and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') = date(now()) and lt.CreatedBranch = '".$branchId."' and ltf.StatusName ='S020'";
|
||||
$ltd=$this->db->query($sql);
|
||||
$tlead = $ltd->result();
|
||||
//to staff
|
||||
@ -857,7 +858,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
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 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' ";
|
||||
$ltd=$this->db->query($sql);
|
||||
$tlead = $ltd->result();
|
||||
//To staff
|
||||
|
||||
Loading…
Reference in New Issue
Block a user