FIX_Live Read Excel : ps

This commit is contained in:
VE10-Sanjeev 2024-04-17 06:49:31 +00:00
parent 557c83f398
commit 39f7d1a377

View File

@ -116,7 +116,7 @@ class readexceldata
if(isset($return_data['key_stakeholders']))
{ $pd_master = $CI->PD_Model->getPDMasterDetails($pd_id);
$product_abbr = $pd_master[0]['product_abbr'];
if($product_abbr == "LFMP" || $product_abbr == "MLAP"){ // ### LFMP,MLAP Started Here.
if($product_abbr == "LFMP"){ // ### LFMP Started Here.
$new_company_data = SELF::getCompanyListForSMCList($file);
$companycount = (count($new_company_data)>0) ? count($new_company_data) : 1;
for($i = 0;$i < $companycount; $i++)
@ -143,7 +143,35 @@ class readexceldata
}
}
$return_data['company_details'] = $new_company_data;
}//###LFMP,MLAP Flow Closed Here
}//###LFMP Flow Closed Here
else if($product_abbr == "MLAP"){ // ### MLAP Started Here.
$new_company_data = SELF::getCompanyListForSMCList($file);
$companycount = (count($new_company_data)>0) ? count($new_company_data) : 1;
for($i = 0;$i < $companycount; $i++)
{
$j =0 ; //### temp inx (bcoz maran asked)
foreach ($return_data['key_stakeholders'] as $key => $value)
{
$dynamic_share_key = ('share_holding#'.($i + 1));
$dynamic_vintage_key = ('vintage_in_current_biz#'.($i + 1));
$dynamic_work_exp_key = ('total_work_exp#'.($i + 1));
if((array_key_exists( $dynamic_share_key, $value)) && (array_key_exists( $dynamic_vintage_key, $value)) && (array_key_exists( $dynamic_work_exp_key, $value)))
{
$temp['company_id'] = isset($new_company_data[$i]['company_id'])?$new_company_data[$i]['company_id']:0;
$temp['company_name'] = isset($new_company_data[$i]['borrower_name'])?$new_company_data[$i]['borrower_name']:"";
$temp['started_biz'] = "NO";
$temp['stakeholder_name'.$j] = $value['stakeholder_name'] != "" ? $value['stakeholder_name'] : NULL;
$temp['share_holding'.$j] = $value[$dynamic_share_key] != "" ? $value[$dynamic_share_key] : NULL;
$temp['vintage_in_current_biz'.$j] = $value[$dynamic_vintage_key] != "" ? $value[$dynamic_vintage_key] : 0;
$temp['total_work_exp'.$j] = $value[ $dynamic_work_exp_key ] != "" ? $value[ $dynamic_work_exp_key ] : 0;
$temp['stakeholder_length'] = ($j+1);
$re_arranged_stake_holders_details[$i] = $temp;
}
$j++;
}
}
$return_data['company_details'] = $new_company_data;
}//### MLAP Flow Closed Here
else{
foreach ($return_data['key_stakeholders'] as $key => $value)
{