Fixes 3 : ps
This commit is contained in:
parent
7d78c36dd8
commit
949fc6f9da
@ -1373,12 +1373,12 @@ public function filterSalesPDList_post() {
|
|||||||
|
|
||||||
function loadDataFromExcelBusiProcess($pd_master_data,$form_id)
|
function loadDataFromExcelBusiProcess($pd_master_data,$form_id)
|
||||||
{
|
{
|
||||||
$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']);
|
$is_file_uploaded = ($pd_master_data[0]['re_uploaded'] ? true : ($pd_master_data[0]['modified_fname'] ? true : false));
|
||||||
// $filename = XLPATH.'/tmp/mySMCPD_client_working.xlsx';
|
|
||||||
// $filename = 'C:\Users\Venba\Documents\Test Demo17_dev_LFMP.xls';
|
if($is_file_uploaded){
|
||||||
// $filename = 'C:\Users\Venba\Downloads\Test Demo17_dev.xlsx';
|
$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']);
|
||||||
// echo $filename;die();
|
// $filename = XLPATH.'/tmp/mySMCPD_client_working.xlsx';
|
||||||
// $filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
//$filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
||||||
if(!file_exists($filename))
|
if(!file_exists($filename))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1392,6 +1392,9 @@ public function filterSalesPDList_post() {
|
|||||||
//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 [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1727,41 +1730,39 @@ 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']);
|
||||||
if($pd_master_data[0]['modified_fname'] != "" && $pd_master_data[0]['re_uploaded_file_name'] != ""){
|
$is_file_uploaded = ($pd_master_data[0]['re_uploaded'] ? true : ($pd_master_data[0]['modified_fname'] ? true : false));
|
||||||
$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']);
|
if($is_file_uploaded){
|
||||||
// $filename = '/home/VenbaLap08/Downloads/Test Demo17_dev.xlsx';
|
$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/venba/Downloads/Sample_CET_Upload4.xls';
|
//$filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
||||||
if(!file_exists($filename))
|
if(!file_exists($filename))
|
||||||
{
|
{
|
||||||
$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');
|
||||||
|
|
||||||
$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{
|
||||||
else{
|
$arr = $this->PD_Model->getApplicantsDetails($pd_master_data[0]['pd_id']);
|
||||||
$arr = $this->PD_Model->getApplicantsDetails($pd_master_data[0]['pd_id']);
|
$filtered_arr = array_filter($arr, function ($var) {
|
||||||
$new_arr = array_filter($arr, function ($var) {
|
return ($var['applicant_type'] != 0);
|
||||||
return ($var['applicant_type'] != 0);
|
});
|
||||||
});
|
|
||||||
if(!empty($new_arr)){
|
if(!empty($filtered_arr)){
|
||||||
for($i=0;$i<count($new_arr);$i++){
|
for($i=0;$i<count($filtered_arr);$i++){
|
||||||
$cur_section_data[$i]['borrower_type'] = $new_arr[$i]['applicant_type'] == 1 ? "Main Applicant" : "Company";
|
$cur_section_data[$i]['borrower_type'] = $filtered_arr[$i]['applicant_type'] == 1 ? "Main Applicant" : "Company";
|
||||||
$cur_section_data[$i]['borrower_name'] = $new_arr[$i]['company_name'];
|
$cur_section_data[$i]['borrower_name'] = $filtered_arr[$i]['company_name'];
|
||||||
$cur_section_data[$i]['entity_type'] = "Non Individual";
|
$cur_section_data[$i]['entity_type'] = "Non Individual";
|
||||||
$cur_section_data[$i]['designation'] = "";
|
$cur_section_data[$i]['designation'] = "";
|
||||||
$cur_section_data[$i]['relationship_to'] = "";
|
$cur_section_data[$i]['relationship_to'] = "";
|
||||||
$cur_section_data[$i]['relationship'] = "";
|
$cur_section_data[$i]['relationship'] = "";
|
||||||
$cur_section_data[$i]['borrower_age'] = "";
|
$cur_section_data[$i]['borrower_age'] = "";
|
||||||
$cur_section_data[$i]['numbers_of_years_business_running'] = "";
|
$cur_section_data[$i]['numbers_of_years_business_running'] = "";
|
||||||
$cur_section_data[$i]['company_id'] = $new_arr[$i]['pd_co_applicant_id'];
|
$cur_section_data[$i]['company_id'] = $filtered_arr[$i]['pd_co_applicant_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else $cur_section_data = [];
|
||||||
$cur_section_data = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(count($cur_section_data))
|
if(count($cur_section_data))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user