DOC TO COLLECT ADDED

This commit is contained in:
Velz2020 2020-05-01 22:54:33 +05:30
parent 148b121818
commit 4dc5c4d488

View File

@ -9658,6 +9658,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
public function getPDImgData($pd_id,$random_string,$is_cus_link_disabled)
{
$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);
//print_r($docs_to_be_collected);die();
$final_data = array();
$common_images = array();
@ -9676,7 +9678,31 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
$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')
{
// doc to be collected img check add it to final data
if(is_array($docs_to_be_collected) && count($docs_to_be_collected))
{
foreach ($docs_to_be_collected as $dc_key => $dc_value)
{
if ($value['pd_document_title'] == $dc_value['doc_name'])
{
$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;
}
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
{
@ -9685,6 +9711,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$final_data[] = array('img_key' => $key,'img_name' => $value[0],'img_url' => "",'fk_form_id' => $value[1]);
}
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");
}
}
}
//print_r($final_data);die();
//$final_data[] = array('imag_data' => $common_images,'is_multiple' => 1);
@ -9702,7 +9736,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//;die();
foreach ($this->existing_imges as $key => $value)
{
//print_r($value);
//print_r($value);die();
// echo $current_img_key.'***'.$value['pd_document_title'];
// echo '<br>';
// echo '<br>';
@ -9747,7 +9781,6 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
// unset($this->photo_names['selfie_with_person_met']);
// return $arr;
}
else if(strpos($current_img_key, $value['pd_document_title']) !== false)
{
//echo $current_img_key.'***'.$value['pd_document_title'];
@ -9778,6 +9811,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$msg = "Dear Applicant, Please click the link to upload the photographs. " . CUSTOMER_IMG_URL .$random_string;
$res = SMS_GUPSHUP::sendSMS($msg,$mobile_no,array('pd_id' => $pd_id,'status' => 'STARTED','msg' => 'Cus Link from PD controlller'),true);
//print_r($res);
$res = explode('|', $res);
if(is_array($res) && count($res))