SMARD PD REPORTS 1

This commit is contained in:
Velz2020 2020-09-26 16:26:44 +05:30
parent e6e3bdd25f
commit 283fbec3f6
9 changed files with 14008 additions and 21 deletions

View File

@ -89,7 +89,7 @@ $autoload['drivers'] = array();
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber');
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber','vendor_form');
/*
| -------------------------------------------------------------------

View File

@ -2009,12 +2009,13 @@ public function assignPDTempalate($data)
$this->checkEmptyQueryParams($_GET);
$page = 0;$limit = 1000;$sort = 'DESC';$pdofficerid = "";$datetype = "";$fdate ="";$tdate ="";
$lenderid = "";$status="";$lender_details = array();
$pdagencyid = "";
$pdagencyid = "";$vendor_pdofficer = "";
if($this->get('page')) { $page = $this->get('page'); }
if($this->get('limit')){ $limit = $this->get('limit'); }
if($this->get('sort')) { $sort = $this->get('sort'); }
if($this->get('pdofficerid')) { $pdofficerid = $this->get('pdofficerid'); }
if($this->get('pdagencyid')) { $pdagencyid = $this->get('pdagencyid'); }
if($this->get('vendor_pdofficer')) { $vendor_pdofficer = $this->get('vendor_pdofficer'); }
if($this->get('lenderid'))
{
$lenderid = $this->get('lenderid');
@ -2026,7 +2027,7 @@ public function assignPDTempalate($data)
if($this->get('fdate')) { $fdate = $this->get('fdate'); }
if($this->get('tdate')) { $tdate = $this->get('tdate'); }
if($this->get('status')) { $status = $this->get('status'); }
$result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid);
$result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer);
if($result_data['data_status'] == true)
{
@ -2128,7 +2129,8 @@ public function assignPDTempalate($data)
$pd_officer_id = isset($records['pd_officer_id']) ? $records['pd_officer_id'] : null ;
$include_archive = $records['is_include_archived'];
$pd_agency_id = $records['pd_agency_id'];
$result_data = $this->PD_Model->PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id);
$vendor_pdofficer = $records['vendor_pdofficer'];
$result_data = $this->PD_Model->PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer);
if(count($result_data))
{
@ -6039,11 +6041,11 @@ public function getPDFormDetailsJSON_post()
{
$records = $this->post('records');
$pd_master_details = $this->PD_Model->getPDMasterDetails($records['pd_id']);
$video_key = 'DOW8jDJ9';
$final_video_name = $records['pd_id'].'-'.$video_key;
$this->mergeVideo($records['pd_id'],$pd_master_details,$final_video_name,$video_key);die();
// $records = $this->post('records');
// $pd_master_details = $this->PD_Model->getPDMasterDetails($records['pd_id']);
// $video_key = 'DOW8jDJ9';
// $final_video_name = $records['pd_id'].'-'.$video_key;
// $this->mergeVideo($records['pd_id'],$pd_master_details,$final_video_name,$video_key);die();
// $msg = "OTP for starting your personal discussions with the verification officer is 999999.Pls share this only when the officer has reached your place in person.";
// $res = SMS_GUPSHUP::sendSMS($msg,9715454901 ,array(),true);
//print_r($res);
@ -6248,6 +6250,7 @@ public function getPDFormDetailsJSON_post()
for($i = 1;$i<=30;$i++)
{
$fields = array('processed_json');
if($i == 25) { $fields = array('json'); }
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
$data['pd_processed_forms'][$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
@ -6312,7 +6315,7 @@ public function getPDFormDetailsJSON_post()
{
if($data['pd_master_details'][0]['fk_pd_type'] == 1 || $data['pd_master_details'][0]['fk_pd_type'] == 2)
if($data['pd_master_details'][0]['fk_pd_type'] == 1 )
{
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
@ -6332,6 +6335,25 @@ public function getPDFormDetailsJSON_post()
$t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true);
}
}
else if($data['pd_master_details'][0]['fk_pd_type'] == 2)
{
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
{
$t = $this->load->view('report_templates/JSONTOREPORT_CLIX_SMARTPD',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI')
{
$t = $this->load->view('report_templates/JSONTOREPORT_RI_SMARTPD',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SEP_INDV')
{
$t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_SMARTPD',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL')
{
$t = $this->load->view('report_templates/JSONTOREPORT_SAL_SMARTPD',$data,true);
}
}
else if($data['pd_master_details'][0]['fk_pd_type'] == 3) //Tele PD
{
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
@ -7692,7 +7714,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
break;
case 2://SMART PD
$score_questions = PDSCORE::genericDISmartPDScoreCalculate($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details);
break;
case 3://tele PD
@ -10339,7 +10361,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//print_r($records);
$fields_to_update = array('vendor_status' => $records['vendor_status'],'fk_updatedby' => $records['fk_updatedby']);
if(isset($records['fk_pd_allocated_to']))
if(isset($records['vendor_pdofficer']))
{
$fields_to_update['vendor_pdofficer'] = $records['vendor_pdofficer'];
}

View File

@ -1084,12 +1084,12 @@ class PDSCORE
//######2.11 location_suited_for_busienss
$location_suited_for_busienss_L2 = $business_distribute_level_weightage ? ($location_suited_for_busienss_L2 + ($location_suited_for_busienss_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $location_suited_for_busienss_L2 ;
// $location_suited_for_busienss_L2 = $business_distribute_level_weightage ? ($location_suited_for_busienss_L2 + ($location_suited_for_busienss_L2 / (100 - $business_distribute_level_weightage )) * $business_distribute_level_weightage) : $location_suited_for_busienss_L2 ;
$location_suited_for_busienss_actual_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * $location_suited_for_busienss[ $score_questions['business']['location_suited_for_busienss'] ];
$location_suited_for_busienss_max_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * max($location_suited_for_busienss);
// $location_suited_for_busienss_actual_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * $location_suited_for_busienss[ $score_questions['business']['location_suited_for_busienss'] ];
// $location_suited_for_busienss_max_score = ($l1_business/100) * ($location_suited_for_busienss_L2/100) * max($location_suited_for_busienss);
$score_questions['business']['location_suited_for_busienss'] = array('l1_weightage' => $l1_business,'l2_weightage' => ($location_suited_for_busienss_L2),'answer' => $score_questions['business']['location_suited_for_busienss'],'attributed_score' => ($location_suited_for_busienss_actual_score), 'max_score' => ($location_suited_for_busienss_max_score),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $location_suited_for_busienss[ $score_questions['business']['location_suited_for_busienss'] ],'max_score_band' => max($location_suited_for_busienss));
// $score_questions['business']['location_suited_for_busienss'] = array('l1_weightage' => $l1_business,'l2_weightage' => ($location_suited_for_busienss_L2),'answer' => $score_questions['business']['location_suited_for_busienss'],'attributed_score' => ($location_suited_for_busienss_actual_score), 'max_score' => ($location_suited_for_busienss_max_score),'distributed_weightage' => $business_distribute_level_weightage,'score_band' => $location_suited_for_busienss[ $score_questions['business']['location_suited_for_busienss'] ],'max_score_band' => max($location_suited_for_busienss));
//######2.11 business_activity_has_seen

View File

@ -0,0 +1,69 @@
<?php
class vendor_form
{
public static function getVendorGeneralSectionContent($vendor_gen_section)
{
$CI =&get_instance();
$CI->load->model('PD_Model');
$return_data = 'DEFULT TEXT';
if($vendor_gen_section['person_met_entered'])
{
$return_data = $vendor_gen_section['person_met_entered']." ".$vendor_gen_section['designation_entered'] ." met at the visited address during FI.";
}
else
{
foreach ($vendor_gen_section['individuals'] as $ind_key => $ind_value)
{
if($ind_value['is_person_met'])
{
$return_data = "Applicant ".$ind_value['applicant_name']." was met at the visited address during FI.";
break;
}
}
}
return $return_data;
}
public static function getVendoraddressSectionContent($vendor_add_section)
{
$CI =&get_instance();
$CI->load->model('PD_Model');
$return_data = array();//fi_initiated_address
$initiated_address = vendor_form::getAddress($CI,$vendor_add_section,1);
$actual_address = $vendor_add_section['is_pd_done_on_initiated_address'] ? array() : vendor_form::getAddress($CI,$vendor_add_section,2);
$address_type_name = $vendor_add_section['address_type_others'] ? $vendor_add_section['address_type_others'] : $CI->PD_Model->selectCustomRecords(array('address_type'),array('address_type_id' => $vendor_add_section['address_type']),ADDRESSTYPE);
$address_locality = $vendor_add_section['locality_others'] ? $vendor_add_section['locality_others'] : $CI->PD_Model->selectCustomRecords(array('locality_name'),array('locality_id' => $vendor_add_section['locality']),LOCALITY);
$uom = $vendor_add_section['uom_others'] ? $vendor_add_section['uom_others'] : $CI->PD_Model->selectCustomRecords(array('name'),array('uom_id' => $vendor_add_section['uom']),UOM);
$pd_location_approach = $CI->PD_Model->selectCustomRecords(array('description'),array('pd_location_approach_id' => $vendor_add_section['pd_location']),PDLOCATIONAPPROACH);
$comment_locality = $CI->PD_Model->selectCustomRecords(array('rating'),array('comments_on_locality_id' => $vendor_add_section['comment_locality']),COMMENTSONLOCALITY);
return array('initiated_address' => $initiated_address,'actual_address' => $actual_address,'address_type' => $address_type_name[0]['address_type'],'address_locality' => $address_locality[0]['locality_name'],'uom' => $uom[0]['name'],'pd_location_approach' => $pd_location_approach[0]['description'],'comment_locality' => $comment_locality[0]['rating']);
}
static function getAddress($CI,$vendor_add_section,$addres_type = 1)//1 = visited address, 2 = alternative address
{
$CI->load->model('PD_Model');
$state_id = $addres_type == 1 ? $vendor_add_section['state'] : $vendor_add_section['alternative_addresses'][0]['alternative_state'];
$city_id = $addres_type == 1 ? $vendor_add_section['city'] : $vendor_add_section['alternative_addresses'][0]['alternative_city'];
$pincode_id = $addres_type == 1 ? $vendor_add_section['pincode'] : $vendor_add_section['alternative_addresses'][0]['alternative_pincode'];
$state_name = $CI->PD_Model->selectCustomRecords(array('name'),array('state_id' => $state_id),STATE);
$city_name = $CI->PD_Model->selectCustomRecords(array('name'),array('city_id' => $city_id),CITY);
$pincode = $CI->PD_Model->selectCustomRecords(array('pincode'),array('pincode_id' => $pincode_id),PINCODE);
return array('state_name' => $state_name[0]['name'],'city_name' => $city_name[0]['name'],'pincode' => $pincode[0]['pincode']);
}
}
?>

View File

@ -11,7 +11,7 @@ class PD_Model extends SPARQ_Model {
}
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid)// $page represents mysql offset
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer)// $page represents mysql offset
{
//echo $pd_agency_id;die();
$this->db->SELECT('PDTRIGGER.pd_id,PDTRIGGER.imgc_fin_institute,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PRODUCTS.prod_catagory,PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as master_updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,PDTRIGGER.is_notify_enabled,(SELECT DATE_FORMAT(createdon,"%d/%m/%Y") FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon,ENTITYFININSTITUTION.institute_name as fin_institute_name,PDTRIGGER.is_video_merged,PDTRIGGER.vendor_status');
@ -52,6 +52,11 @@ class PD_Model extends SPARQ_Model {
$this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficerid);
}
}
if($vendor_pdofficer != "" || $vendor_pdofficer != null)
{
$this->db->WHERE('PDTRIGGER.vendor_pdofficer',$vendor_pdofficer);
}
if($lenderid != "" || $lenderid != null)
{
@ -178,7 +183,7 @@ class PD_Model extends SPARQ_Model {
//PD List with Common Filters
public function PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id)
public function PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer)
{
$limit = 1000;
@ -270,7 +275,12 @@ class PD_Model extends SPARQ_Model {
if($pd_officer_id != "" || $pd_officer_id != null )
{
$this->db->LIKE('PDTRIGGER.fk_pd_allocated_to',"$pd_officer_id");
$limit = 200;
$limit = 100;
}
if($vendor_pdofficer != "" || $vendor_pdofficer != null )
{
$this->db->LIKE('PDTRIGGER.vendor_pdofficer',"$vendor_pdofficer");
$limit = 100;
}
$this->db->ORDER_BY('PDTRIGGER.pd_id','DESC');
@ -1127,6 +1137,7 @@ class PD_Model extends SPARQ_Model {
$pd_master_detials = $this->getPDMasterDetails($pdid,$random_string);
$pd_additional_requirements = $this->getPDAdditionalRequirements($pdid);
$docs_to_be_collected = $this->getDocsToBeCollected($pdid);
//echo count($docs_to_be_collected);die();
$pd_applicants_detials = $this->getApplicantsDetails($pdid);
@ -1348,7 +1359,12 @@ class PD_Model extends SPARQ_Model {
{
$result_data['pdmaster_details'] = $pd_master_detials[0];
}
$result_data['pdapplicants_detials'] = $pd_applicants_detials;
$result_data['pdapplicants_detials'] = $pd_applicants_detials;
if($pd_master_detials[0]['fk_pd_type'] == 2)
{
$result_data['vendor_form_status'] = $this->getVendorFormStatus($pdid);
}
// $result_data['template_forms'] = json_decode(json_encode($template_forms), true);//$template_forms;
$result_data['template_forms'] = array_values($template_forms);
@ -1977,7 +1993,7 @@ class PD_Model extends SPARQ_Model {
public function getAddtionalPDInformations($addressid)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.random_string,PRODUCTS.prod_catagory,,PDTRIGGER.vendor_status');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name,PDTRIGGER.vendor_pdofficer,concat(VENDORPDOFFICER.first_name," ",VENDORPDOFFICER.last_name) as vendor_pdofficer_name,PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,OTPREJECTION.rejection_reason,PDTRIGGER.otp_reject_other_reason,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.random_string,PRODUCTS.prod_catagory,,PDTRIGGER.vendor_status');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITY.' as SUBENTITY','PDTRIGGER.sub_entity_id = SUBENTITY.entity_id ','LEFT');
@ -1993,6 +2009,7 @@ class PD_Model extends SPARQ_Model {
$this->db->JOIN(USERPROFILE.' as USERPROFILE3','PDTRIGGER.executive_id = USERPROFILE3.userid','LEFT');
$this->db->JOIN(USERPROFILE.' as EXECUTIVE','PDTRIGGER.executive_id = EXECUTIVE.userid','LEFT');
$this->db->JOIN(USERPROFILE.' as CENTRALOFFICER','PDTRIGGER.central_pd_officer_id = CENTRALOFFICER.userid','LEFT');
$this->db->JOIN(USERPROFILE.' as VENDORPDOFFICER','PDTRIGGER.vendor_pdofficer = VENDORPDOFFICER.userid','LEFT');
$this->db->JOIN(TEMPLATE.' as TEMPLATE','PDTRIGGER.fk_pd_template_id = TEMPLATE.template_id','LEFT');
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','PDTRIGGER.fk_customer_segment = CUSTOMERSEGMENT.customer_segment_id','LEFT');
$this->db->JOIN(ENTITY.' as AGENCY','PDTRIGGER.pd_agency_id = AGENCY.entity_id','LEFT');

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff