Live Fixes : ps
This commit is contained in:
parent
7c3460bd52
commit
5d6923e31b
@ -5007,7 +5007,11 @@ public function getPDFormDetailsJSON_post()
|
|||||||
$pd_type = $data['pd_master_details'][0]['fk_pd_type'] == 3 ? 3 : 1;
|
$pd_type = $data['pd_master_details'][0]['fk_pd_type'] == 3 ? 3 : 1;
|
||||||
$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => ($data['pd_master_details'][0]['sub_entity_id'] ? $data['pd_master_details'][0]['sub_entity_id'] : $data['pd_master_details'][0]['fk_lender_id']),'fk_pd_type' => $pd_type));
|
$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => ($data['pd_master_details'][0]['sub_entity_id'] ? $data['pd_master_details'][0]['sub_entity_id'] : $data['pd_master_details'][0]['fk_lender_id']),'fk_pd_type' => $pd_type));
|
||||||
//}
|
//}
|
||||||
|
if($data['pd_master_details'][0]['lender_short_name'] == 'CSLFL'){
|
||||||
|
$entity_geo_location = $this->PD_Model->getEntityAddr($data['pd_master_details'][0]['fk_lender_id']);
|
||||||
|
$pd_location = $data['pd_master_details'][0]['start_location'];
|
||||||
|
$data['distances'] = satellite_image::getdistancematrix($entity_geo_location,$pd_location);
|
||||||
|
}
|
||||||
//$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id']));
|
//$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id']));
|
||||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||||
|
|||||||
@ -1380,19 +1380,23 @@ public function filterSalesPDList_post() {
|
|||||||
// $filename = 'C:\Users\Venba\Downloads\Test Demo17_dev.xlsx';
|
// $filename = 'C:\Users\Venba\Downloads\Test Demo17_dev.xlsx';
|
||||||
// echo $filename;die();
|
// echo $filename;die();
|
||||||
// $filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
// $filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
||||||
if(!file_exists($filename))
|
if(is_file($filename)){
|
||||||
{
|
if(!file_exists($filename))
|
||||||
|
{
|
||||||
|
|
||||||
//echo 'getting it from s3';
|
//echo 'getting it from s3';
|
||||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_data[0]['fk_lender_id'];
|
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_data[0]['fk_lender_id'];
|
||||||
$key = 'tmp/'. ($pd_master_data[0]['re_uploaded'] ? $pd_master_data[0]['re_uploaded_file_name'] : $pd_master_data[0]['modified_fname']);
|
$key = 'tmp/'. ($pd_master_data[0]['re_uploaded'] ? $pd_master_data[0]['re_uploaded_file_name'] : $pd_master_data[0]['modified_fname']);
|
||||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'+5 minutes');
|
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'+5 minutes');
|
||||||
//echo $singed_uri;
|
//echo $singed_uri;
|
||||||
$sucess = file_put_contents($filename, file_get_contents($singed_uri));
|
$sucess = file_put_contents($filename, file_get_contents($singed_uri));
|
||||||
|
|
||||||
//echo '*'.$sucess;
|
//echo '*'.$sucess;
|
||||||
}
|
}
|
||||||
return $cur_section_data = readexceldata::getExcelSectionData($filename,$form_id,$pd_master_data[0]['pd_id']);
|
return $cur_section_data = readexceldata::getExcelSectionData($filename,$form_id,$pd_master_data[0]['pd_id']);
|
||||||
|
}else{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1728,20 +1732,42 @@ public function filterSalesPDList_post() {
|
|||||||
{
|
{
|
||||||
$records = $this->post('records');
|
$records = $this->post('records');
|
||||||
$pd_master_data = $this->PD_Model->getPDMasterDetails($records['pd_id'],$records['random_string']);
|
$pd_master_data = $this->PD_Model->getPDMasterDetails($records['pd_id'],$records['random_string']);
|
||||||
|
// $filename = ($pd_master_data[0]['re_uploaded'] ? XLPATH.'/tmp/'.$pd_master_data[0]['re_uploaded_file_name'] : XLPATH.'/tmp/'.$pd_master_data[0]['modified_fname']);
|
||||||
$filename = ($pd_master_data[0]['re_uploaded'] ? XLPATH.'/tmp/'.$pd_master_data[0]['re_uploaded_file_name'] : XLPATH.'/tmp/'.$pd_master_data[0]['modified_fname']);
|
|
||||||
// $filename = '/home/VenbaLap08/Downloads/Test Demo17_dev.xlsx';
|
// $filename = '/home/VenbaLap08/Downloads/Test Demo17_dev.xlsx';
|
||||||
|
$filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
||||||
if(!file_exists($filename))
|
if(is_file($filename)){
|
||||||
{
|
if(!file_exists($filename))
|
||||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_data[0]['fk_lender_id'];
|
{
|
||||||
$key = 'tmp/'. ($pd_master_data[0]['re_uploaded'] ? $pd_master_data[0]['re_uploaded_file_name'] : $pd_master_data[0]['modified_fname']);
|
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_data[0]['fk_lender_id'];
|
||||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'+5 minutes');
|
$key = 'tmp/'. ($pd_master_data[0]['re_uploaded'] ? $pd_master_data[0]['re_uploaded_file_name'] : $pd_master_data[0]['modified_fname']);
|
||||||
|
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'+5 minutes');
|
||||||
$sucess = file_put_contents($filename, file_get_contents($singed_uri));
|
|
||||||
}
|
$sucess = file_put_contents($filename, file_get_contents($singed_uri));
|
||||||
$cur_section_data = readexceldata::getCompanyListForSMCList($filename,$pd_master_data[0]['pd_id']);
|
}
|
||||||
|
$cur_section_data = readexceldata::getCompanyListForSMCList($filename,$pd_master_data[0]['pd_id']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$arr = $this->PD_Model->getApplicantsDetails($pd_master_data[0]['pd_id']);
|
||||||
|
$new_arr = array_filter($arr, function ($var) {
|
||||||
|
return ($var['applicant_type'] != 0);
|
||||||
|
});
|
||||||
|
if(!empty($new_arr)){
|
||||||
|
for($i=0;$i<count($new_arr);$i++){
|
||||||
|
$cur_section_data[$i]['b-orrower_type'] = $new_arr[$i]['applicant_type'] == 1 ? "Main Applicant" : "Company";
|
||||||
|
$cur_section_data[$i]['borrower_name'] = $new_arr[$i]['company_name'];
|
||||||
|
$cur_section_data[$i]['entity_type'] = "Non Individual";
|
||||||
|
$cur_section_data[$i]['designation'] = "";
|
||||||
|
$cur_section_data[$i]['relationship_to'] = "";
|
||||||
|
$cur_section_data[$i]['relationship'] = "";
|
||||||
|
$cur_section_data[$i]['borrower_age'] = "";
|
||||||
|
$cur_section_data[$i]['numbers_of_years_business_running'] = "";
|
||||||
|
$cur_section_data[$i]['company_id'] = $new_arr[$i]['pd_co_applicant_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$cur_section_data = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
if(count($cur_section_data))
|
if(count($cur_section_data))
|
||||||
{
|
{
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user