TRUNCATE STATUS ADDED MIS REPORT PARAM CHANGED

This commit is contained in:
Velz2020 2019-09-14 13:01:19 +05:30
parent da92cc9c79
commit 758de09730
5 changed files with 12 additions and 9 deletions

View File

@ -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**************************/

View File

@ -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;

View File

@ -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();

View File

@ -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());

View File

@ -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))
{