Fixes 3 : ps
This commit is contained in:
parent
7d78c36dd8
commit
949fc6f9da
@ -1373,11 +1373,11 @@ public function filterSalesPDList_post() {
|
|||||||
|
|
||||||
function loadDataFromExcelBusiProcess($pd_master_data,$form_id)
|
function loadDataFromExcelBusiProcess($pd_master_data,$form_id)
|
||||||
{
|
{
|
||||||
|
$is_file_uploaded = ($pd_master_data[0]['re_uploaded'] ? true : ($pd_master_data[0]['modified_fname'] ? true : false));
|
||||||
|
|
||||||
|
if($is_file_uploaded){
|
||||||
$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 = XLPATH.'/tmp/mySMCPD_client_working.xlsx';
|
// $filename = XLPATH.'/tmp/mySMCPD_client_working.xlsx';
|
||||||
// $filename = 'C:\Users\Venba\Documents\Test Demo17_dev_LFMP.xls';
|
|
||||||
// $filename = 'C:\Users\Venba\Downloads\Test Demo17_dev.xlsx';
|
|
||||||
// echo $filename;die();
|
|
||||||
//$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,9 +1730,9 @@ 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));
|
||||||
|
if($is_file_uploaded){
|
||||||
$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/venba/Downloads/Sample_CET_Upload4.xls';
|
//$filename = '/home/venba/Downloads/Sample_CET_Upload4.xls';
|
||||||
if(!file_exists($filename))
|
if(!file_exists($filename))
|
||||||
{
|
{
|
||||||
@ -1740,28 +1743,26 @@ public function filterSalesPDList_post() {
|
|||||||
$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']);
|
||||||
$new_arr = array_filter($arr, function ($var) {
|
$filtered_arr = array_filter($arr, function ($var) {
|
||||||
return ($var['applicant_type'] != 0);
|
return ($var['applicant_type'] != 0);
|
||||||
});
|
});
|
||||||
if(!empty($new_arr)){
|
|
||||||
for($i=0;$i<count($new_arr);$i++){
|
if(!empty($filtered_arr)){
|
||||||
$cur_section_data[$i]['borrower_type'] = $new_arr[$i]['applicant_type'] == 1 ? "Main Applicant" : "Company";
|
for($i=0;$i<count($filtered_arr);$i++){
|
||||||
$cur_section_data[$i]['borrower_name'] = $new_arr[$i]['company_name'];
|
$cur_section_data[$i]['borrower_type'] = $filtered_arr[$i]['applicant_type'] == 1 ? "Main Applicant" : "Company";
|
||||||
|
$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