TELEPD REPORT FEEDBACK & CUSLINK FEEDBACK

This commit is contained in:
Velz2020 2020-05-07 19:11:23 +05:30
parent f12085b697
commit 8c69d0f7cb
2 changed files with 4931 additions and 42 deletions

View File

@ -4776,25 +4776,35 @@ public function getPDFormDetailsJSON_post()
$temp = 'DEFAULT DATA'; $temp = 'DEFAULT DATA';
// if(!count($add_on_pd)) // if(!count($add_on_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'))
if($data['pd_master_details'][0]['fk_pd_type'] == 1) //Full PD
{ {
$temp = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true);
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',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI')
{
$t = $this->load->view('report_templates/JSONTOREPORT_RI',$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',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL')
{
$t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true);
}
} }
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI') else if($data['pd_master_details'][0]['fk_pd_type'] == 3) //Tele PD
{ {
$temp = $this->load->view('report_templates/JSONTOREPORT_RI',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_TELE_PD',$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')
{
$temp = $this->load->view('report_templates/JSONTOREPORT_DI_AI',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL')
{
$temp = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true);
} }
// } // }
// else // else
// { // {
// $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true); // $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true);
// } // }
@ -6121,25 +6131,35 @@ public function getPDFormDetailsJSON_post()
$t = ""; $t = "";
if(!count($add_on_pd)) if(!count($add_on_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'))
if($data['pd_master_details'][0]['fk_pd_type'] == 1) //Full PD
{ {
$t = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true);
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',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI')
{
$t = $this->load->view('report_templates/JSONTOREPORT_RI',$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',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL')
{
$t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true);
}
} }
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI') else if($data['pd_master_details'][0]['fk_pd_type'] == 3) //Tele PD
{ {
$t = $this->load->view('report_templates/JSONTOREPORT_RI',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_TELE_PD',$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',$data,true);
}
else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL')
{
$t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true);
} }
} }
else else
{ {
$t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true);
} }
//$t = $this->load->view('temp_html.html',null,true); //$t = $this->load->view('temp_html.html',null,true);
@ -9503,6 +9523,9 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//print_r($records);die(); //print_r($records);die();
$img_array = array(); $img_array = array();
$current_doc_title = null; $current_doc_title = null;
// for business related images
$company_id = null;
if($records['image_key'] == 'selfie_with_person_met' || $records['image_key'] == 'person_met_id') if($records['image_key'] == 'selfie_with_person_met' || $records['image_key'] == 'person_met_id')
{ {
//get main applicant name //get main applicant name
@ -9545,6 +9568,20 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$img_array['Name'] = $records['name']; $img_array['Name'] = $records['name'];
$current_doc_title = $records['image_key']; $current_doc_title = $records['image_key'];
} }
else if(strpos($records['image_key'], 'stock_image') !== false)
{
$img_array['image'] = $records['image'];
$img_array['Name'] = $records['image_key'];
$current_doc_title = $records['image_key'];
$company_id = 1;
}
else if(strpos($records['image_key'], 'docs_to_be_collected') !== false)
{
$img_array['image'] = $records['image'];
$img_array['Name'] = $records['name'];
$current_doc_title = $records['name'];
}
else else
{ {
$img_array['image'] = $records['image']; $img_array['image'] = $records['image'];
@ -9555,13 +9592,13 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//echo $current_doc_title;die(); //echo $current_doc_title;die();
//de activate previous one //de activate previous one
if($records['image_key'] != 'common_image') if($records['image_key'] != 'common_image' && $records['image_key'] != 'stock_image')
{ {
$this->PD_Model->updateRecords(array('isactive' => 0),PDDOCUMENTS,array('fk_pd_id' => $records['fk_pd_id'],'fk_form_id' => $records['fk_form_id'],'pd_document_title' => $current_doc_title)); $this->PD_Model->updateRecords(array('isactive' => 0),PDDOCUMENTS,array('fk_pd_id' => $records['fk_pd_id'],'fk_form_id' => $records['fk_form_id'],'pd_document_title' => $current_doc_title));
// print_r($this->db->last_query()); // print_r($this->db->last_query());
} }
$res = $this->saveBase64Images($records['fk_pd_id'],$records['fk_form_id'],$company_id = null,$rental_count_id = null,array($img_array)); $res = $this->saveBase64Images($records['fk_pd_id'],$records['fk_form_id'],$company_id,$rental_count_id = null,array($img_array));
if($res) if($res)
{ {
$data['dataStatus'] = true; $data['dataStatus'] = true;
@ -9659,11 +9696,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{ {
$this->existing_imges = $this->PD_Model->getSignedPDDocsURL($pd_id,null,null,null,null,'report'); $this->existing_imges = $this->PD_Model->getSignedPDDocsURL($pd_id,null,null,null,null,'report');
$docs_to_be_collected = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' =>$pd_id),PDDOCSTOBECOLLECTED); $docs_to_be_collected = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' =>$pd_id),PDDOCSTOBECOLLECTED);
//print_r($docs_to_be_collected);die(); //print_r($docs_to_be_collected);//die();
$final_data = array(); $final_data = array();
$common_images = array(); $common_images = array();
//print_r(count($this->existing_imges));die(); //print_r(($this->existing_imges));die();
if(count($this->existing_imges)) if(count($this->existing_imges))
{ {
foreach ($this->photo_names as $key => $value) foreach ($this->photo_names as $key => $value)
@ -9674,33 +9711,57 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
foreach ($this->existing_imges as $key => $value) foreach ($this->existing_imges as $key => $value)
{ {
//print_r(count($this->existing_imges));
if(!$value['fk_form_id'] && ($value['pd_document_title'] != 'satellite')) if(!$value['fk_form_id'] && ($value['pd_document_title'] != 'satellite'))
{ {
$final_data[] = array('img_key' =>'common_image','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => null); $final_data[] = array('img_key' =>'common_image','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => null);
} }
elseif($value['pd_document_title'] != 'satellite') elseif($value['pd_document_title'] != 'satellite' && $value['fk_form_id'] == 24)
{ {
// doc to be collected img check add it to final data // doc to be collected img check add it to final data
if(is_array($docs_to_be_collected) && count($docs_to_be_collected)) if(is_array($docs_to_be_collected) && count($docs_to_be_collected))
{ {
//print_r(count($this->existing_imges));
$is_listed = false;
foreach ($docs_to_be_collected as $dc_key => $dc_value) foreach ($docs_to_be_collected as $dc_key => $dc_value)
{ {
if ($value['pd_document_title'] == $dc_value['doc_name']) //echo 'before if check - '.$dc_value['doc_name'].'#'.$value['pd_document_title'].'****';
if ($dc_value['doc_name'] == $value['pd_document_title'])
{ {
$is_listed = true;
unset($docs_to_be_collected[$dc_key]);
//echo 'inside if check - '.$dc_value['doc_name'].'#'.$value['pd_document_title'].'****';
}
}
if($is_listed)
{
$final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => 24,'is_multiple' => 0); $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['pd_document_title'],'img_url' => $value['doc_url'],'fk_form_id' => 24,'is_multiple' => 0);
// return $arr; //break;
}
else
{
$final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $dc_value['doc_name'],'img_url' => '','fk_form_id' => 24,'is_multiple' => 0);
}
unset($docs_to_be_collected[$dc_key]);
} }
// else
// {
// $final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $dc_value['doc_name'],'img_url' => '','fk_form_id' => 24,'is_multiple' => 0);
// }
} }
}
}
//print_r(($docs_to_be_collected));
//add remaining docs_to_be_collected into final array
if(is_array($docs_to_be_collected) && count($docs_to_be_collected))
{
foreach ($docs_to_be_collected as $key => $value)
{
$final_data[] = array('img_key' => 'docs_to_be_collected','img_name' => $value['doc_name'],'img_url' => "",'fk_form_id' => "24");
}
} }
}
} }

File diff suppressed because it is too large Load Diff