LFMP Same as MLAP changes : ps

This commit is contained in:
VE10-Sanjeev 2024-04-08 13:14:29 +00:00
parent d483b248e5
commit 557c83f398
4 changed files with 25 additions and 23 deletions

View File

@ -216,7 +216,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
//$view_name = $SMC_CREDIT_PD[0]['short_name'].'_'.$SMC_CREDIT_PD[0]['abbr']; //$view_name = $SMC_CREDIT_PD[0]['short_name'].'_'.$SMC_CREDIT_PD[0]['abbr'];
$view_name = $SMC_CREDIT_PD[0]['short_name']; $view_name = $SMC_CREDIT_PD[0]['short_name'];
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true); $html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
//echo $html_content;die(); // echo $html_content;exit();
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait"); $pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
//End of PDF Gen using DOM PDF //End of PDF Gen using DOM PDF
$output_file = $this->external_path ."/sales_pd/" . $smc_credit_pd . "/temp.pdf"; $output_file = $this->external_path ."/sales_pd/" . $smc_credit_pd . "/temp.pdf";
@ -476,12 +476,12 @@ class SMC_Credit_PD_Controller extends REST_Controller {
} }
} }
# LFMP key_stakeholders # LFMP,MLAP key_stakeholders
if ($mater_details[0]['product_abbr'] == 'LFMP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) { if ($mater_details[0]['product_abbr'] == 'LFMP' && (array_key_exists("key_stakeholders",$pd_section_data[5])) ) {
$LFMP_KeyStackholders = $pd_section_data[5]['key_stakeholders']; $new_KeyStackholders = $pd_section_data[5]['key_stakeholders'];
$temp_arr = []; $temp_arr = [];
for ($i = 0; $i < count($LFMP_KeyStackholders); $i++) { for ($i = 0; $i < count($new_KeyStackholders); $i++) {
$value = $LFMP_KeyStackholders[$i]; $value = $new_KeyStackholders[$i];
if (isset($value["stakeholder_name0"])) { if (isset($value["stakeholder_name0"])) {
$temp_arr[] = array( $temp_arr[] = array(
"company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name0"], "company_name" => $value["company_name"], "stakeholder_name" => $value["stakeholder_name0"],
@ -508,7 +508,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
} }
$CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr; $CETAPP_creditPD_data['Key Stakeholders in Business']['key_stakeholders'] = $temp_arr;
} }
} // ### LFMP key_stakeholders ends } ### LFMP,MLAP key_stakeholders ends
// print_r($filter_form_id);die(); // print_r($filter_form_id);die();
@ -2082,19 +2082,19 @@ public function filterSalesPDList_post() {
//score card part //score card part
// print_r($view_data); // print_r($view_data);
// 25 "product_abbr": "NBFC/MFI", // 25 "product_abbr": "NBFC/MFI",
//### LFMP key_stakeholders ends ### LFMP, MLAP key_stakeholders ends
if($view_data['pd_master_details'][0]['product_abbr'] == 'LFMP'){ if($view_data['pd_master_details'][0]['product_abbr'] == 'LFMP' || $view_data['pd_master_details'][0]['product_abbr'] == 'MLAP'){
$LFMP_KeyStackholders = $view_data['pd_section_data'][5]['key_stakeholders']; $new_KeyStackholders = $view_data['pd_section_data'][5]['key_stakeholders'];
$temp_arr = []; $temp_arr = [];
// print_r($LFMP_KeyStackholders); // print_r($new_KeyStackholders);
// count($LFMP_KeyStackholders); // count($new_KeyStackholders);
for($i=0;$i<count($LFMP_KeyStackholders);$i++){ for($i=0;$i<count($new_KeyStackholders);$i++){
// echo "\n"." i= ".$i; // echo "\n"." j= ".$j.$key;// echo "\n".$key; // echo "\n"." i= ".$i; // echo "\n"." j= ".$j.$key;// echo "\n".$key;
// if($key == "company_name"){ // if($key == "company_name"){
// $temp_arr[$j]["company_name"] = $value; // $temp_arr[$j]["company_name"] = $value;
// $j++; // $j++;
// } // }
$value = $LFMP_KeyStackholders[$i]; $value = $new_KeyStackholders[$i];
if(isset($value["stakeholder_name0"])){ if(isset($value["stakeholder_name0"])){
$temp_arr[] = array("company_name"=>$value["company_name"],"stakeholder_name"=>$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"], "share_holding"=>$value["share_holding0"],"vintage_in_current_biz"=>$value["vintage_in_current_biz0"],
@ -2115,7 +2115,7 @@ public function filterSalesPDList_post() {
} }
} }
$view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr; $view_data['pd_section_data'][5]['key_stakeholders'] = $temp_arr;
}// ### LFMP key_stakeholders ends } ### LFMP,MLAP key_stakeholders ends
// print_r($view_data['pd_section_data']);die(); // print_r($view_data['pd_section_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']); $view_data['report_attachments'] = (new report_attachments)->getSMCReportAttchments($records['pd_id'],$view_data['pd_master_details'][0]['random_string'],$view_data['pd_master_details']);
@ -2124,7 +2124,7 @@ public function filterSalesPDList_post() {
}else{ }else{
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true); $html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
} }
//print_r($html_content);exit(); // print_r($html_content);exit();
$pdf_name = $view_data['pd_master_details'][0]['main_applicant']; $pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
$new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant']; $new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant'];

View File

@ -1955,6 +1955,8 @@ public function filterSalesPDList_post() {
$product_id = 8; $product_id = 8;
}else if(strtoupper($productname) == "WCTL"){ }else if(strtoupper($productname) == "WCTL"){
$product_id = 9; $product_id = 9;
}else if(strtoupper($productname) == "MLAP"){
$product_id = 28;
} }
$count = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'), array('lender_id' => $lenderid, 'product_id' => $product_id, 'isactive' => 1), SALES_PD_DATA); $count = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'), array('lender_id' => $lenderid, 'product_id' => $product_id, 'isactive' => 1), SALES_PD_DATA);

View File

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

View File

@ -447,7 +447,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td colspan="3" >End use of Loan</td> <td colspan="3" >End use of Loan</td>
<td class = "tdcenteralign" colspan="7" ><?php echo ( isset($pd_section_data[3]['end_use']) ? $pd_section_data[3]['end_use'] : '-')?></td> <td class = "tdcenteralign" colspan="7" ><?php echo ( isset($pd_section_data[3]['end_use']) ? $pd_section_data[3]['end_use'] : '-')?></td>
</tr> </tr>
<?php if($pd_master_details[0]['product_abbr'] == 'LFMP'){ ?> <?php if($pd_master_details[0]['product_abbr'] == 'LFMP' || $pd_master_details[0]['product_abbr'] == 'MLAP'){ ?>
<tr> <tr>
<td colspan="3" >Is There any Balance Transfer</td> <td colspan="3" >Is There any Balance Transfer</td>
<td class = "tdcenteralign" colspan="7" ><?php echo isset($pd_section_data[3]['is_transfer']) ? $pd_section_data[3]['is_transfer'] : '-'?></td> <td class = "tdcenteralign" colspan="7" ><?php echo isset($pd_section_data[3]['is_transfer']) ? $pd_section_data[3]['is_transfer'] : '-'?></td>