From f8807ce4e9b2a28de3f5fcc9b97207510a8e6e60 Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Wed, 11 Aug 2021 12:02:33 +0530 Subject: [PATCH] Company details added in key stakeholders : ps --- .../helpers/readexceldata_helper.php | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/api/application/helpers/readexceldata_helper.php b/api/application/helpers/readexceldata_helper.php index ad8d5d28..9454af3e 100644 --- a/api/application/helpers/readexceldata_helper.php +++ b/api/application/helpers/readexceldata_helper.php @@ -28,7 +28,7 @@ class readexceldata $sheetData = $spreadsheet_io_fact->getActiveSheet()->toArray(null, true, false, true); //print_r($sheetData);die(); return - SELF::seperateSectionData($section_id,$sheetData,$pd_id); + SELF::seperateSectionData($section_id,$sheetData,$pd_id,$file_path_withname); // print_r(SELF::seperateSectionData($section_id,$sheetData,$pd_id));die(); // $CI->load->model('PD_Model'); @@ -40,7 +40,7 @@ class readexceldata } - static function seperateSectionData($section_id,$sheetData,$pd_id) + static function seperateSectionData($section_id,$sheetData,$pd_id,$file) { // echo 's-worked';die(); $CI =&get_instance(); @@ -48,7 +48,6 @@ class readexceldata $where_condition_array = array('isactive' => 1,'section_id' => $section_id); //if($section_id == null){ $where_condition_array = array('isactive' => 1,'section_id in ' => '(null,1)'); } $section_ref_data = $CI->PD_Model->selectCustomRecords(array('*'),$where_condition_array,EXCEL_COLUMN_REF_NAME); - $company_data = $CI->PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'section_id' =>1),EXCEL_COLUMN_REF_NAME); // print_r($section_ref_data);die(); $return_data = array(); // $section_id = is_null($section_id) ? '' : $section_id; @@ -102,20 +101,8 @@ class readexceldata { $pd_master = $CI->PD_Model->getPDMasterDetails($pd_id); $product_abbr = $pd_master[0]['product_abbr']; if($product_abbr == "LFMP"){ // ### LFMP Started Here. - $LFMP_company_data = SELF::getIndividualSectionData($sheetData,$company_data); - $LFMP_companies = array(); - if(!empty($LFMP_company_data['borrower_details'])){ - $cid=0;//for company ID - for($i=0;$i0) ? count($LFMP_companies) : 1; + $LFMP_company_data = SELF::getCompanyListForSMCList($file); + $companycount = (count($LFMP_company_data)>0) ? count($LFMP_company_data) : 1; for($i = 0;$i <= $companycount; $i++) { $j =0 ; //### temp inx (bcoz maran asked) @@ -126,8 +113,8 @@ class readexceldata $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($LFMP_companies[$i]['company_id'])?$LFMP_companies[$i]['company_id']:0; - $temp['company_name'] = isset($LFMP_companies[$i]['company_name'])?$LFMP_companies[$i]['company_name']:""; + $temp['company_id'] = isset($LFMP_company_data[$i]['company_id'])?$LFMP_company_data[$i]['company_id']:0; + $temp['company_name'] = isset($LFMP_company_data[$i]['borrower_name'])?$LFMP_company_data[$i]['borrower_name']:""; $temp['started_biz'] = "NO"; $temp['stakeholder_name'.$j] = $value['stakeholder_name']; $temp['share_holding'.$j] = $value[$dynamic_share_key]; @@ -138,6 +125,7 @@ class readexceldata $j++; } } + $return_data['company_details'] = $LFMP_company_data; }//###LFMP Flow Closed Here else{ foreach ($return_data['key_stakeholders'] as $key => $value)