DUP FEEDBACK 2

This commit is contained in:
Velz2020 2020-08-15 23:45:19 +05:30
parent d9c9784938
commit 407f49e397
2 changed files with 49 additions and 33 deletions

View File

@ -9693,24 +9693,22 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$pd_master_details['fk_createdby'] = $fk_createdby; $pd_master_details['fk_createdby'] = $fk_createdby;
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~$_'; $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters); $charactersLength = strlen($characters);
$randomString = 'D$'; $randomIter = rand(0, 15);
for ($i = 0; $i < 16; $i++) for ($i = 0; $i < 16; $i++)
{ {
$randomString .= $characters[rand(0, $charactersLength - 1)]; $randomString .= $characters[rand(0, $charactersLength - 1)];
if($i == $randomIter){$randomString .= 'cc';}
} }
$pd_master_details['random_string'] = $randomString; $pd_master_details['random_string'] = $randomString;
$url = OFFICER_TRACKING_URL.$randomString; $url = OFFICER_TRACKING_URL.$randomString;
$pd_master_details['encrypted_url'] = $url; $pd_master_details['encrypted_url'] = $url;
//print_r($pd_master_details); //print_r($pd_master_details);
$new_pd_id = $this->PD_Model->saveRecords($pd_master_details,PDTRIGGER); // $new_pd_id = $this->PD_Model->saveRecords($pd_master_details,PDTRIGGER);
log_message('ERROR','####NEW PD Trigged by dup funciton:-'.$new_pd_id); log_message('ERROR','####NEW PD Trigged by dup funciton:-'.$new_pd_id);
} }
//Get All Applicant's Details //Get All Applicant's Details
$applicants_details = $this->PD_Model->selectCustomRecords(array('pd_co_applicant_id','applicant_name', 'applicant_type', 'mobile_no','relation', 'company_name', 'applicant_title_name','landline'),array('fk_pd_id' => $pdid),PDAPPLICANTSDETAILS); $applicants_details = $this->PD_Model->selectCustomRecords(array('pd_co_applicant_id','applicant_name', 'applicant_type', 'mobile_no','relation', 'company_name', 'applicant_title_name','landline'),array('fk_pd_id' => $pdid),PDAPPLICANTSDETAILS);
@ -9850,7 +9848,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
} }
//replace old img string from gen & busi forms //replace old img string from gen & busi forms
if($value['fk_form_id'] == 18 || $value['fk_form_id'] == 13) if($value['fk_form_id'] == 18 || $value['fk_form_id'] == 13 || $value['fk_form_id'] == 24)
{ {
//print_r($value); //print_r($value);
$value = $this->emptyImgStringsInsideJSON($value); $value = $this->emptyImgStringsInsideJSON($value);
@ -9863,7 +9861,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
} }
log_message('ERROR','####Copying ALL JSON END:-'.$new_pd_id); log_message('ERROR','####Copying ALL JSON END:-'.$new_pd_id);
} }
// die();
//copy Assessed Income Tables //copy Assessed Income Tables
if($pd_master_details['fk_customer_segment'] == 4 && $new_pd_id)//AI if($pd_master_details['fk_customer_segment'] == 4 && $new_pd_id)//AI
{ {
@ -9871,7 +9869,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$this->dupAssessedIncomeInfo($pdid,$new_pd_id,$fk_createdby); $this->dupAssessedIncomeInfo($pdid,$new_pd_id,$fk_createdby);
} }
// die();
//copy all s3 into new pd folder //copy all s3 into new pd folder
if($new_pd_id) if($new_pd_id)
@ -9921,6 +9919,24 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$value['json'] = json_encode($temp_json); $value['json'] = json_encode($temp_json);
} }
if($value['fk_form_id'] == 24)
{
$temp_json = (json_decode($value['json'],true));
//print_r($temp_json);//die();
if(isset($temp_json['docs_to_be_sighted']) && count($temp_json['docs_to_be_sighted']))
{
foreach ($temp_json['docs_to_be_sighted'] as $dskey => $ds_value)
{
if(isset($ds_value['img']))
{
$temp_json['docs_to_be_sighted'][$dskey]['img'] = '';
}
}
}
//print_r($temp_json);
$value['json'] = json_encode($temp_json);
}
if($value['fk_form_id'] == 13) if($value['fk_form_id'] == 13)
{ {
@ -9945,15 +9961,15 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{ {
$temp_json['esic_regn_pic'] = ''; $temp_json['esic_regn_pic'] = '';
} }
if(isset($temp_json['pd_document_title'])) if(isset($temp_json['export_import_cert_pic']))
{ {
$temp_json['export_import_cert_pic'] = ''; $temp_json['export_import_cert_pic'] = '';
} }
if(isset($temp_json['pd_document_title'])) if(isset($temp_json['factory_cert_pic']))
{ {
$temp_json['factory_cert_pic'] = $temp_json['doc_url']; $temp_json['factory_cert_pic'] = '';
} }
if(isset($temp_json['pd_document_title'])) if(isset($temp_json['practice_cert_pic']))
{ {
$temp_json['practice_cert_pic'] = ''; $temp_json['practice_cert_pic'] = '';
} }
@ -9961,7 +9977,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{ {
$temp_json['fire_noc_pic'] = ''; $temp_json['fire_noc_pic'] = '';
} }
if(isset($temp_json['pd_document_title'])) if(isset($temp_json['eb_bill_pic']))
{ {
$temp_json['eb_bill_pic'] = ''; $temp_json['eb_bill_pic'] = '';
} }

View File

@ -25,7 +25,7 @@ class pdcompletenesscheck
{ {
$pd_images[$i] = $CI->PD_Model->getSignedPDDocsURL($pdid,$i); $pd_images[$i] = $CI->PD_Model->getSignedPDDocsURL($pdid,$i);
$fields = array('processed_json'); $fields = array('json');
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i); $where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
$form_data[$i] = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC'); $form_data[$i] = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
} }
@ -36,9 +36,9 @@ class pdcompletenesscheck
#####General Form Questions######## #####General Form Questions########
$general_form = (json_decode($form_data[18][0]['processed_json'],true)); $general_form = (json_decode($form_data[18][0]['json'],true));
// echo "seperateScoreQuestions"; // echo "seperateScoreQuestions";
//print_r($general_form);die(); //print_r($form_data[18]);die();
$person_met_is_applicant_count = 0; $person_met_is_applicant_count = 0;
@ -114,7 +114,7 @@ class pdcompletenesscheck
if($pd_master_details[0]['customer_segment_abbr'] == 'SE-AI' || $pd_master_details[0]['customer_segment_abbr'] == 'SE-DI') if($pd_master_details[0]['customer_segment_abbr'] == 'SE-AI' || $pd_master_details[0]['customer_segment_abbr'] == 'SE-DI')
{ {
#####Business Form Questions######## #####Business Form Questions########
$business_form = (json_decode($form_data[13][0]['processed_json'],true)); $business_form = (json_decode($form_data[13][0]['json'],true));
//print_r($business_form);die(); //print_r($business_form);die();
//print_r(($business_form['shop_eat_act_cert']));die(); //print_r(($business_form['shop_eat_act_cert']));die();
$is_manufacturing_selected = 0; $is_manufacturing_selected = 0;
@ -256,7 +256,7 @@ class pdcompletenesscheck
if( $client != 'WEB')// if API came from web then ignore this check if( $client != 'WEB')// if API came from web then ignore this check
{ {
$finance_form = isset($form_data[14][0]['processed_json'])?(json_decode($form_data[14][0]['processed_json'],true)):array(); $finance_form = isset($form_data[14][0]['json'])?(json_decode($form_data[14][0]['json'],true)):array();
$finance_form_photo_count = isset($pd_images[14]) ? count($pd_images[14]) : 0; $finance_form_photo_count = isset($pd_images[14]) ? count($pd_images[14]) : 0;
//print_r($finance_form);die(); //print_r($finance_form);die();
//print_r($pd_images[14]);die(); //print_r($pd_images[14]);die();
@ -276,7 +276,7 @@ class pdcompletenesscheck
#####Business Assets Form Questions######## #####Business Assets Form Questions########
if( $client != 'WEB')// if API came from web then ignore this check if( $client != 'WEB')// if API came from web then ignore this check
{ {
$business_assest_form = (json_decode($form_data[22][0]['processed_json'],true)); $business_assest_form = (json_decode($form_data[22][0]['json'],true));
$businees_assest_images_count = isset($pd_images[22]) ? count($pd_images[22]) : 0; $businees_assest_images_count = isset($pd_images[22]) ? count($pd_images[22]) : 0;
//print_r($business_assest_form);die(); //print_r($business_assest_form);die();
if(array_key_exists('business_assets_details',$business_assest_form)) if(array_key_exists('business_assets_details',$business_assest_form))
@ -294,7 +294,7 @@ class pdcompletenesscheck
} }
#####End of Business Assets Form Questions######## #####End of Business Assets Form Questions########
$business_bank_form = isset($form_data[21][0]['processed_json'])?(json_decode($form_data[21][0]['processed_json'],true)):array(); $business_bank_form = isset($form_data[21][0]['json'])?(json_decode($form_data[21][0]['json'],true)):array();
if(count($business_bank_form)) if(count($business_bank_form))
{ {
$not_available_count = 0; $not_available_count = 0;
@ -318,7 +318,7 @@ class pdcompletenesscheck
{ {
#####supplier Form Questions######## #####supplier Form Questions########
$supplier_form = isset($form_data[1][0]['processed_json'])?(json_decode($form_data[1][0]['processed_json'],true)):array(); $supplier_form = isset($form_data[1][0]['json'])?(json_decode($form_data[1][0]['json'],true)):array();
//print_r($supplier_form);die(); //print_r($supplier_form);die();
$supplier_count = 0; $supplier_count = 0;
@ -500,7 +500,7 @@ class pdcompletenesscheck
#####client Form Questions######## #####client Form Questions########
$client_form = isset($form_data[2][0]['processed_json'])?(json_decode($form_data[2][0]['processed_json'],true)):array(); $client_form = isset($form_data[2][0]['json'])?(json_decode($form_data[2][0]['json'],true)):array();
//print_r($client_form);die(); //print_r($client_form);die();
$client_images = isset($pd_images[2]) ? $pd_images[2] : array(); $client_images = isset($pd_images[2]) ? $pd_images[2] : array();
$client_count = 0; $client_count = 0;
@ -656,7 +656,7 @@ class pdcompletenesscheck
#####Stock Form Questions######## #####Stock Form Questions########
$stock_form = isset($form_data[11][0]['processed_json'])?(json_decode($form_data[11][0]['processed_json'],true)):array(); $stock_form = isset($form_data[11][0]['json'])?(json_decode($form_data[11][0]['json'],true)):array();
//print_r($stock_form);die(); //print_r($stock_form);die();
if(count($stock_form)) if(count($stock_form))
{ {
@ -763,7 +763,7 @@ class pdcompletenesscheck
{ {
$pd_images[$i] = $CI->PD_Model->getSignedPDDocsURL($pdid,$i); $pd_images[$i] = $CI->PD_Model->getSignedPDDocsURL($pdid,$i);
$fields = array('processed_json'); $fields = array('json');
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i); $where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
$form_data[$i] = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC'); $form_data[$i] = $CI->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
} }
@ -774,7 +774,7 @@ class pdcompletenesscheck
#####General Form Questions######## #####General Form Questions########
$general_form = (json_decode($form_data[18][0]['processed_json'],true)); $general_form = (json_decode($form_data[18][0]['json'],true));
// echo "seperateScoreQuestions"; // echo "seperateScoreQuestions";
//print_r($general_form);die(); //print_r($general_form);die();
@ -869,7 +869,7 @@ class pdcompletenesscheck
if($pd_master_details[0]['customer_segment_abbr'] == 'SE-AI' || $pd_master_details[0]['customer_segment_abbr'] == 'SE-DI') if($pd_master_details[0]['customer_segment_abbr'] == 'SE-AI' || $pd_master_details[0]['customer_segment_abbr'] == 'SE-DI')
{ {
#####Business Form Questions######## #####Business Form Questions########
$business_form = (json_decode($form_data[13][0]['processed_json'],true)); $business_form = (json_decode($form_data[13][0]['json'],true));
//print_r($business_form);die(); //print_r($business_form);die();
//print_r(($business_form['shop_eat_act_cert']));die(); //print_r(($business_form['shop_eat_act_cert']));die();
$is_manufacturing_selected = 0; $is_manufacturing_selected = 0;
@ -1013,7 +1013,7 @@ class pdcompletenesscheck
if( $client != 'WEB')// if API came from web then ignore this check if( $client != 'WEB')// if API came from web then ignore this check
{ {
$finance_form = isset($form_data[14][0]['processed_json'])?(json_decode($form_data[14][0]['processed_json'],true)):array(); $finance_form = isset($form_data[14][0]['json'])?(json_decode($form_data[14][0]['json'],true)):array();
$finance_form_photo_count = isset($pd_images[14]) ? count($pd_images[14]) : 0; $finance_form_photo_count = isset($pd_images[14]) ? count($pd_images[14]) : 0;
//print_r($finance_form);die(); //print_r($finance_form);die();
//print_r($pd_images[14]);die(); //print_r($pd_images[14]);die();
@ -1033,7 +1033,7 @@ class pdcompletenesscheck
#####Business Assets Form Questions######## #####Business Assets Form Questions########
if( $client != 'WEB')// if API came from web then ignore this check if( $client != 'WEB')// if API came from web then ignore this check
{ {
$business_assest_form = (json_decode($form_data[22][0]['processed_json'],true)); $business_assest_form = (json_decode($form_data[22][0]['json'],true));
$businees_assest_images_count = isset($pd_images[22]) ? count($pd_images[22]) : 0; $businees_assest_images_count = isset($pd_images[22]) ? count($pd_images[22]) : 0;
//print_r($business_assest_form);die(); //print_r($business_assest_form);die();
if(array_key_exists('business_assets_details',$business_assest_form)) if(array_key_exists('business_assets_details',$business_assest_form))
@ -1051,7 +1051,7 @@ class pdcompletenesscheck
} }
#####End of Business Assets Form Questions######## #####End of Business Assets Form Questions########
$business_bank_form = isset($form_data[21][0]['processed_json'])?(json_decode($form_data[21][0]['processed_json'],true)):array(); $business_bank_form = isset($form_data[21][0]['json'])?(json_decode($form_data[21][0]['json'],true)):array();
if(count($business_bank_form)) if(count($business_bank_form))
{ {
$not_available_count = 0; $not_available_count = 0;
@ -1075,7 +1075,7 @@ class pdcompletenesscheck
{ {
#####supplier Form Questions######## #####supplier Form Questions########
$supplier_form = isset($form_data[1][0]['processed_json'])?(json_decode($form_data[1][0]['processed_json'],true)):array(); $supplier_form = isset($form_data[1][0]['json'])?(json_decode($form_data[1][0]['json'],true)):array();
//print_r($supplier_form);die(); //print_r($supplier_form);die();
$supplier_count = 0; $supplier_count = 0;
@ -1257,7 +1257,7 @@ class pdcompletenesscheck
#####client Form Questions######## #####client Form Questions########
$client_form = isset($form_data[2][0]['processed_json'])?(json_decode($form_data[2][0]['processed_json'],true)):array(); $client_form = isset($form_data[2][0]['json'])?(json_decode($form_data[2][0]['json'],true)):array();
//print_r($client_form);die(); //print_r($client_form);die();
$client_images = isset($pd_images[2]) ? $pd_images[2] : array(); $client_images = isset($pd_images[2]) ? $pd_images[2] : array();
$client_count = 0; $client_count = 0;
@ -1413,7 +1413,7 @@ class pdcompletenesscheck
#####Stock Form Questions######## #####Stock Form Questions########
$stock_form = isset($form_data[11][0]['processed_json'])?(json_decode($form_data[11][0]['processed_json'],true)):array(); $stock_form = isset($form_data[11][0]['json'])?(json_decode($form_data[11][0]['json'],true)):array();
//print_r($stock_form);die(); //print_r($stock_form);die();
if(count($stock_form)) if(count($stock_form))
{ {