FIX_Company Name in Report and Form Dropdown : ps
This commit is contained in:
parent
39f7d1a377
commit
740fc5173c
@ -432,6 +432,16 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
if (!empty($pd_section_data)) {
|
||||
$forms_data_to_be_get_direct_from_excel_sheet = array(3, 9, 10, 15);
|
||||
$companylist = $this->getCompanyName($pd_section_data[0]);
|
||||
$excelSheetid = ($mater_details[0]['excel_file_id']);
|
||||
if(empty($excelSheetid)){
|
||||
$arr = $this->PD_Model->getApplicantsDetails($mater_details[0]['pd_id']);
|
||||
foreach ($arr as $applicant) {
|
||||
if ($applicant['applicant_type'] != 0) {
|
||||
$companylist[$applicant['pd_co_applicant_id']] = ($applicant['applicant_type'] == 1) ? $applicant['applicant_name'] : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($pd_section_data) > 0) {
|
||||
$common_fields = array('pdid'=>$mater_details[0]['pd_id'],
|
||||
'product'=>$mater_details[0]['product_abbr'],
|
||||
@ -476,7 +486,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
# LFMP,MLAP key_stakeholders
|
||||
# LFMP key_stakeholders
|
||||
if ($mater_details[0]['product_abbr'] == 'LFMP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) {
|
||||
$new_KeyStackholders = $pd_section_data[5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
@ -508,7 +518,41 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
||||
}
|
||||
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
}
|
||||
} ### LFMP,MLAP key_stakeholders ends
|
||||
} ### LFMP key_stakeholders ends
|
||||
### MLAP key_stakeholders
|
||||
if ($mater_details[0]['product_abbr'] == 'MLAP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) {
|
||||
$new_KeyStackholders = $pd_section_data[5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
for ($i = 0; $i < count($new_KeyStackholders); $i++) {
|
||||
$value = $new_KeyStackholders[$i];
|
||||
if (isset($value["stakeholder_name0"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name0"],
|
||||
"share_holding" => $value["share_holding0"], "vintage_in_current_biz" => $value["vintage_in_current_biz0"],
|
||||
"total_work_exp" => $value["total_work_exp0"], "started_biz" => $value["started_biz0"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details0']) ? $value['previous_experience_details0'] : '')
|
||||
);
|
||||
}
|
||||
if (isset($value["stakeholder_name1"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name1"],
|
||||
"share_holding" => $value["share_holding1"], "vintage_in_current_biz" => $value["vintage_in_current_biz1"],
|
||||
"total_work_exp" => $value["total_work_exp1"], "started_biz" => $value["started_biz1"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details1']) ? $value['previous_experience_details1'] : '')
|
||||
);
|
||||
}
|
||||
if (isset($value["stakeholder_name2"])) {
|
||||
$temp_arr[] = array(
|
||||
"company_name" => $value["company_name"],
|
||||
"stakeholder_name" => $value["stakeholder_name2"], "share_holding" => $value["share_holding2"],
|
||||
"vintage_in_current_biz" => $value["vintage_in_current_biz2"], "total_work_exp" => $value["total_work_exp2"], "started_biz" => $value["started_biz2"],
|
||||
"previous_experience_details" => (isset($value['previous_experience_details2']) ? $value['previous_experience_details2'] : '')
|
||||
);
|
||||
}
|
||||
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
|
||||
}
|
||||
}
|
||||
### MLAP key_stakeholders
|
||||
// print_r($filter_form_id);die();
|
||||
|
||||
|
||||
@ -2012,6 +2056,15 @@ public function filterSalesPDList_post() {
|
||||
|
||||
// Using borrower_details in $pd_section_data To Get the company name for SMC Credit PD => MWISE;
|
||||
$companylist = $this->getCompanyName($pd_section_data[0]);
|
||||
$excelSheetid = ($view_data['pd_master_details'][0]['excel_file_id']);
|
||||
if(empty($excelSheetid)){
|
||||
$arr = $this->PD_Model->getApplicantsDetails($pd_master_data[0]['pd_id']);
|
||||
foreach ($arr as $applicant) {
|
||||
if ($applicant['applicant_type'] != 0) {
|
||||
$companylist[$applicant['pd_co_applicant_id']] = ($applicant['applicant_type'] == 1) ? $applicant['applicant_name'] : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
$view_data['company'] = $companylist ;
|
||||
$filter_form_id =array();
|
||||
// $officerdetails_form_id =array(1,4,21);
|
||||
@ -2082,8 +2135,8 @@ public function filterSalesPDList_post() {
|
||||
//score card part
|
||||
// print_r($view_data);
|
||||
// 25 "product_abbr": "NBFC/MFI",
|
||||
### LFMP, MLAP key_stakeholders ends
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == 'LFMP' || $view_data['pd_master_details'][0]['product_abbr'] == 'MLAP'){
|
||||
### LFMP key_stakeholders ends
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == 'LFMP'){
|
||||
$new_KeyStackholders = $view_data['pd_section_data'][5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
// print_r($new_KeyStackholders);
|
||||
@ -2115,8 +2168,41 @@ public function filterSalesPDList_post() {
|
||||
}
|
||||
}
|
||||
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
|
||||
} ### LFMP,MLAP key_stakeholders ends
|
||||
// print_r($view_data['pd_section_data']);die();
|
||||
} ### LFMP key_stakeholders ends
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == 'MLAP'){
|
||||
$new_KeyStackholders = $view_data['pd_section_data'][5]['key_stakeholders'];
|
||||
$temp_arr = [];
|
||||
// print_r($new_KeyStackholders);
|
||||
// count($new_KeyStackholders);
|
||||
for($i=0;$i<count($new_KeyStackholders);$i++){
|
||||
// echo "\n"." i= ".$i; // echo "\n"." j= ".$j.$key;// echo "\n".$key;
|
||||
// if($key == "company_name"){
|
||||
// $temp_arr[$j]["company_name"] = $value;
|
||||
// $j++;
|
||||
// }
|
||||
$value = $new_KeyStackholders[$i];
|
||||
if(isset($value["stakeholder_name0"])){
|
||||
$temp_arr[] = array("company_name"=>$value["company_name"],"stakeholder_name"=>$value["stakeholder_name0"],
|
||||
"share_holding"=>$value["share_holding0"],"vintage_in_current_biz"=>$value["vintage_in_current_biz0"],
|
||||
"total_work_exp"=>$value["total_work_exp0"],"started_biz"=>$value["started_biz0"],
|
||||
"previous_experience_details"=>(isset($value['previous_experience_details0']) ? $value['previous_experience_details0'] : '' ));
|
||||
}
|
||||
if(isset($value["stakeholder_name1"])){
|
||||
$temp_arr[]=array("company_name"=>$value["company_name"],"stakeholder_name"=>$value["stakeholder_name1"],
|
||||
"share_holding"=>$value["share_holding1"],"vintage_in_current_biz"=>$value["vintage_in_current_biz1"],
|
||||
"total_work_exp"=>$value["total_work_exp1"],"started_biz"=>$value["started_biz1"],
|
||||
"previous_experience_details"=>(isset($value['previous_experience_details1']) ? $value['previous_experience_details1'] : ''));
|
||||
}
|
||||
if(isset($value["stakeholder_name2"])){
|
||||
$temp_arr[] = array("company_name"=>$value["company_name"],
|
||||
"stakeholder_name"=> $value["stakeholder_name2"],"share_holding"=>$value["share_holding2"],
|
||||
"vintage_in_current_biz"=>$value["vintage_in_current_biz2"],"total_work_exp"=>$value["total_work_exp2"],"started_biz"=>$value["started_biz2"],
|
||||
"previous_experience_details"=> (isset($value['previous_experience_details2'])?$value['previous_experience_details2'] : '' ));
|
||||
}
|
||||
}
|
||||
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
|
||||
} ### MLAP key_stakeholders ends
|
||||
// print_r($view_data);die();
|
||||
$view_data['report_attachments'] = (new report_attachments)->getSMCReportAttchments($records['pd_id'],$view_data['pd_master_details'][0]['random_string'],$view_data['pd_master_details']);
|
||||
|
||||
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
|
||||
@ -2295,7 +2381,8 @@ public function filterSalesPDList_post() {
|
||||
|
||||
if(!empty($filtered_arr)){
|
||||
for($i=0;$i<count($filtered_arr);$i++){
|
||||
$cur_section_data[$i]['borrower_type'] = $filtered_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_type'] = "Company";
|
||||
$cur_section_data[$i]['borrower_name'] = $filtered_arr[$i]['company_name'];
|
||||
$cur_section_data[$i]['entity_type'] = "Non Individual";
|
||||
$cur_section_data[$i]['designation'] = "";
|
||||
|
||||
@ -224,7 +224,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3"> Name of the Company/Firm.<?php echo $applicant_details[0]['company_name']; ?></td>
|
||||
<td colspan="3"> Name of the Company/Firm</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($applicant_details[0]['company_name']) && (strlen($applicant_details[0]['company_name']) != 0) ? $applicant_details[0]['company_name'] : $pd_master_details[0]['main_applicant']?></td>
|
||||
</tr>
|
||||
|
||||
@ -1578,4 +1578,3 @@ echo $report_attachments;
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user