diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 7c2ce5e6..b9a41764 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -154,6 +154,7 @@ defined('CANCELLED') OR define('CANCELLED','CANCELLED'); defined('DRAFT') OR define('DRAFT','DRAFT'); defined('RESCHEDULED') OR define('RESCHEDULED','RESCHEDULED'); defined('ADD_ON_PENDING') OR define('ADD_ON_PENDING','ADD_ON_PENDING'); +defined('TRUNCATED') OR define('TRUNCATED','TRUNCATED'); /*******************End Of Constants PD status**************************/ diff --git a/api/application/controllers/Dash_Board_Controller.php b/api/application/controllers/Dash_Board_Controller.php index fdb9fdd0..013e49ca 100644 --- a/api/application/controllers/Dash_Board_Controller.php +++ b/api/application/controllers/Dash_Board_Controller.php @@ -163,9 +163,9 @@ class Dash_Board_Controller extends REST_Controller { $to_date = isset($filter_params['to_date']) && $filter_params['to_date'] != '' ? $filter_params['to_date'] : null; $city = isset($filter_params['city']) && $filter_params['city'] != '' ? $filter_params['city'] : null; $branch = isset($filter_params['branch']) && $filter_params['branch'] != '' ? $filter_params['branch'] : null; - $lenderid = isset($filter_params['lenderid']) && $filter_params['lenderid'] != '' ? $filter_params['lenderid'] : null; + $lender_short_name = isset($filter_params['lender_short_name']) && $filter_params['lender_short_name'] != '' ? $filter_params['lender_short_name'] : null; - $res = $this->Dash_Board_Model->pdTATreport($applicant_id,$from_date,$to_date,$city,$branch,$lenderid); + $res = $this->Dash_Board_Model->pdTATreport($applicant_id,$from_date,$to_date,$city,$branch,$lender_short_name); $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 5c9aba0c..a091918a 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -828,7 +828,7 @@ class PD_Controller extends REST_Controller { { $pd_details['start_location'] = $pd_details['link']; - $pd_details['pd_visit_date'] = date('Y-m-d H:i:s'); + unset($pd_details['link']); $string2 = str_shuffle('1234567890'); $OTP = substr($string2,0,6); @@ -856,7 +856,7 @@ class PD_Controller extends REST_Controller { $pd_details['complete_location'] = isset($pd_details['link']) ? $pd_details['link'] : null;; unset($pd_details['link']); } - + $pd_details['pd_visit_date'] = date('Y-m-d H:i:s'); //get satellite image blob and store it in DB $pd_details['satellite_image_base64_blob'] = $this->getSatelliteImage($pd_details['pd_id']); //die(); diff --git a/api/application/models/Dash_Board_Model.php b/api/application/models/Dash_Board_Model.php index 8b459e0f..39ea2ba8 100644 --- a/api/application/models/Dash_Board_Model.php +++ b/api/application/models/Dash_Board_Model.php @@ -233,7 +233,7 @@ class Dash_Board_Model extends SPARQ_Model { return $query->result(); } - public function pdTATreport($applicant_id = null,$from_date = null,$to_date = null,$city = null,$branch = null,$lenderid = null) + public function pdTATreport($applicant_id = null,$from_date = null,$to_date = null,$city = null,$branch = null,$lender_short_name = null) { $this->db->SELECT('*,TIMEDIFF(triggered,draft) as draft_to_triggered,TIMEDIFF(allocated,triggered) as triggered_to_allocated,TIMEDIFF(accepted,allocated) as allocated_to_accepted,TIMEDIFF(scheduled,accepted) as accepted_to_scheduled,TIMEDIFF(initiated,scheduled) as scheduled_to_initiated,TIMEDIFF(started,initiated) as initiated_to_started,TIMEDIFF(inprogress,started) as started_to_inprogress,TIMEDIFF(completed,inprogress) as inprogress_to_completed,TIMEDIFF(qc_complete,completed) as completed_to_completed'); $this->db->FROM(PDMIS); @@ -257,10 +257,10 @@ class Dash_Board_Model extends SPARQ_Model { { $this->db->LIKE('branch',$branch); } - // if($lenderid != null) - // { - // $this->db->LIKE('branch',$branch); - // } + if($lender_short_name != null) + { + $this->db->LIKE('lender',$lender_short_name); + } $query = $this->db->get(); //print_r($this->db->last_query()); diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 019fa81e..49a3061d 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -37,6 +37,7 @@ class PD_Model extends SPARQ_Model { $this->db->JOIN(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH','PDTRIGGER.pd_branch_id = ENTITYLENDERBRANCH.entity_lender_branch_id','LEFT'); $this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1','LEFT'); $this->db->WHERE('PDTRIGGER.pd_status !=',ARCHIVED); + $this->db->WHERE('PDTRIGGER.pd_status !=',TRUNCATED); //$this->db->WHERE('PDTRIGGER.is_child !=',1); if($pdofficerid != "" || $pdofficerid != null) @@ -186,6 +187,7 @@ class PD_Model extends SPARQ_Model { $this->db->JOIN(PINCODE.' as PINCODE','PDTRIGGER.pincode = PINCODE.pincode_id','LEFT'); $this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1','LEFT'); $this->db->JOIN(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH','PDTRIGGER.pd_branch_id = ENTITYLENDERBRANCH.entity_lender_branch_id','LEFT'); + $this->db->WHERE('PDTRIGGER.pd_status !=',TRUNCATED); if(!empty($pd_type)) {