FI changes Feedback -1 : ps

This commit is contained in:
VE10-Sanjeev 2022-12-14 20:00:09 +05:30
parent 0f152c9227
commit 7bef442a8a
6 changed files with 44 additions and 14 deletions

View File

@ -2343,7 +2343,7 @@ class Flyhi_Controller extends REST_Controller {
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
{
$pd_document_data = array('fk_pd_id' => $pd_id,'img_type' => 2,'pd_document_title'=>$doc_renamed,'pd_document_name'=>$doc_renamed,'fk_form_id'=>18,'co_applicant_id'=>$applicant_id);
$pd_document_data = array('fk_pd_id' => $pd_id,'img_type' => 2,'pd_document_title'=>$doc_renamed,'pd_document_name'=>$doc_renamed,'fk_form_id'=>18,'co_applicant_id'=>$applicant_id,'image_key' => 'person_met_id','content_type'=>3);
$pd_document_id = $this->Flyhi_Model->saveRecords($pd_document_data,PDDOCUMENTS);
if($pd_document_id != "" || $pd_document_id != null){ $temp_flag++; }
unlink($src_local_file);
@ -2527,7 +2527,7 @@ $this->load->view("digital_locker",$view_data);
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
{
$pd_document_data = array('fk_pd_id' => $pd_id,'img_type' => 2,'pd_document_title'=>$doc_renamed,'pd_document_name'=>$doc_renamed,'fk_form_id'=>18,'co_applicant_id'=>$applicant_id);
$pd_document_data = array('fk_pd_id' => $pd_id,'img_type' => 2,'pd_document_title'=>$doc_renamed,'pd_document_name'=>$doc_renamed,'fk_form_id'=>18,'co_applicant_id'=>$applicant_id,'image_key' => 'person_met_id','content_type'=>3);
$pd_document_id = $this->Flyhi_Model->saveRecords($pd_document_data,PDDOCUMENTS);
if($pd_document_id != "" || $pd_document_id != null){ $temp_flag++; }
// unlink($src_local_file);

View File

@ -929,6 +929,17 @@ class PD_Controller extends REST_Controller
log_message('ERROR','####COMPLETE SMC IMAGE PDF = '.$PDF);
unset($pd_details['is_this_smc_pd']);
}
if($exist_pd_details[0]['fk_pd_type'] == 4){
$random_string = $this->PD_Model->selectCustomRecords(array('random_string'),array('pd_id' => $pd_details['pd_id']),PDTRIGGER);
$random_string = $random_string[0]['random_string'];
$regenerate = 0 ;
$this->load->helper('photo_zip_creator');
$this->load->helper('photo_pdf_converter');
$ZIP = (new photo_zip_creator)->covertImgs2ZIP($pd_details['pd_id'], $random_string, array(), $regenerate);
$PDF = (new photo_pdf_converter)->covertImgs2PDF($pd_details['pd_id'], $random_string, array(), $regenerate);
log_message('ERROR','####COMPLETE FI IMAGE ZIP = '.$ZIP);
log_message('ERROR','####COMPLETE FI IMAGE PDF = '.$PDF);
}
}
@ -4422,7 +4433,7 @@ class PD_Controller extends REST_Controller
$is_generate = isset($records['is_generate']) ? 1 : 0;
$random_string = $records['random_string'];
$is_qc_edited = 0;
//echo "step1.Function Entered";
// echo "step1.Function Entered";die();
$this->load->helper('report_attachments');
@ -4431,7 +4442,7 @@ class PD_Controller extends REST_Controller
}
$pd_master_details = $this->PD_Model->getPDMasterDetails($pdid, $random_string);
// print_r($pd_master_details);
//print_r($pd_master_details);
// var_dump($pd_master_details[0]['is_img_pdf_created']);
// check img zip link, img pdf link and vide links
if (!$pd_master_details[0]['is_img_pdf_created']) {
@ -4441,7 +4452,7 @@ class PD_Controller extends REST_Controller
if (!$pd_master_details[0]['is_zip_created']) {
$data['msg'] = isset($data['msg']) ? ($data['msg'] . 'Image ZIP' . ', ') : 'Image ZIP, ';
}
//echo $data['msg'];die();
// if($pd_master_details[0]['fk_pd_type'] == 2)
// {
// $video_status = $this->PD_Model->selectCustomRecords(array('count(*) as count'),array('isactive' => 1,'twilo_status' => 'enqueued','fk_pd_id' => $pdid),VIDEO_ROOM_INFO);
@ -5578,7 +5589,9 @@ class PD_Controller extends REST_Controller
public function codeigniterViewTest_post()
{
// echo CI_VERSION;
// echo phpversion();
// die();
// echo "i am here";
// exit();
// $host = getenv('DB_HOST');
@ -5834,10 +5847,11 @@ class PD_Controller extends REST_Controller
{
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid, null, null, null, null, 'report');
} else {
// echo "i am in else";
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid, null, null, 'common', null, 'report');
}
// echo "i ahve image";
// print_r($data['pd_images']);die();
// die();
//print_r(json_decode($data['pd_processed_forms'][24][0]['processed_json']));//die();
@ -6958,6 +6972,8 @@ class PD_Controller extends REST_Controller
public function savePDPhotos_post()
{
//content_type 1 means IMAGES , 2 means VIDEO , 3 means PDF.
$records = $this->post('records');
$company_id = isset($records['company_id']) && $records['company_id'] ? $records['company_id'] : null;

View File

@ -459,10 +459,22 @@ class PD_Model extends SPARQ_Model {
if($value['content_type'] == 1){
$profilepics3path = 'pd'.$pdid.'/'.$value['pd_document_name'];}elseif($value['content_type'] == 2){
$profilepics3path = 'pd'.$pdid.'/video/'.$value['pd_document_name'];
}else if($value['content_type'] == 3){
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$lender_id[0]['fk_lender_id'];
$profilepics3path = 'pd'.$pdid.'/'.$value['pd_document_name'];
}
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$profilepics3path,$time);
$document_lists[$key]['doc_url'] = $singed_uri;
// if($value['content_type'] == 3)
// {
// // $pth = file_get_contents(base_url()."path/to/the/file.pdf");
// // $nme = "sample_file.pdf";
// // force_download($nme, $pth);
// $output_file = $this->external_path ."/tmp/".$value['pd_document_name'];
// file_put_contents($output_file, $singed_uri);
// }
}
}

View File

@ -306,7 +306,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
if (strtoupper($value['is_person_met']) == 'YES') {
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
echo '<p>' . 'Applicant <b>(' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ')</b> was met at the visited address.' . '</p>';
} else if (strtoupper($value['is_person_met']) == 'NO') {
echo '<p>' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
}
@ -321,7 +321,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
// print_r($address_value);
// print_r($address_value);die();
if (!empty($address_value)) {
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
@ -334,7 +334,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br><b>Address Where Visit was actually done:</b> ' . $address_value['actual_pd_address'] . ' , ' . $address_value['city2_master'] . ' , ' . $address_value['state2_master'] . ' , ' . $address_value['pincode2_master'] . '.
<br><b>Reason for change in Visit address:</b> ' . $address_value['end_use'] . '.</p>';
}
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' . $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['Approach_to_PD_location'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' .$address_value['estimated_area'].' '. $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['pd_location_master'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
}
?>
<div id="page_break"></div>

View File

@ -306,7 +306,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
if (strtoupper($value['is_person_met']) == 'YES') {
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
echo '<p>' . 'Applicant <b>(' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ')</b> was met at the visited address.' . '</p>';
} else if (strtoupper($value['is_person_met']) == 'NO') {
echo '<p>' . 'During PD (' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
}
@ -321,6 +321,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
// print_r($address_value);die();
if (!empty($address_value)) {
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {

View File

@ -306,7 +306,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
if (strtoupper($value['is_person_met']) == 'YES') {
echo '<p>' . 'Applicant <b>(' . $value['Name_of_the_Person_met_master'] . ')</b> was met at the visited address.' . '</p>';
echo '<p>' . 'Applicant <b>(' . isset($value['Name_of_the_Person_met_master']) ? $value['Name_of_the_Person_met_master'] : $value['Name_of_the_Person_met'] . ')</b> was met at the visited address.' . '</p>';
} else if (strtoupper($value['is_person_met']) == 'NO') {
echo '<p>' . '(' . $value['Name_of_the_Person'] . ') (' . $value['designation_person_met_master'] . ') was met at the visited address during visit.' . '</p>';
}
@ -321,6 +321,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
echo '<br>';
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
$address_value = $address_form['json'];
// print_r($address_value);die();
if (!empty($address_value)) {
echo '<h3 contenteditable="true"><u>ADDRESS DETAILS</u>: </h3>';
if (strtoupper($address_value['is_pd_done_on_initiated_address']) == 'YES') {
@ -333,7 +334,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
<br><b>Address Where Visit was actually done:</b> ' . $address_value['actual_pd_address'] . ' , ' . $address_value['city2_master'] . ' , ' . $address_value['state2_master'] . ' , ' . $address_value['pincode2_master'] . '.
<br><b>Reason for change in Visit address:</b> ' . $address_value['end_use'] . '.</p>';
}
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' . $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['Approach_to_PD_location'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
echo '<p>' . 'The Field Visit was done at <b>' . $address_value['address_type_master'] . '</b> of the loan applicants. The <b>' . $address_value['address_type_master'] . '</b> is located in a <b>' . $address_value['locality_master'] . '</b> and the estimated area of the <b>' . $address_value['address_type_master'] . '</b> is <b>' .$address_value['estimated_area'].' '. $address_value['uom_master'] . '</b>. The location was <b>' . $address_value['pd_location_master'] . '</b>. As Per Officer, the <b>' . $address_value['address_type_master'] . '</b> is situated in a <b>' . $address_value['comment_locality_master'] . '</b> Locality. ' . '</p>';
}
?>
<div id="page_break"></div>