From 1d409bbc594564f15533db31d9ca4a816c36fbe4 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 27 Sep 2019 18:24:35 +0530 Subject: [PATCH] BUSINESS CAPTION AND OTHER DOC IN BUSINESS RESOLVED --- api/application/controllers/PD_Controller.php | 3 +- api/application/helpers/myutil_helper.php | 67 +++++++++++-------- .../report_templates/JSONTOREPORT_CLIX.php | 2 +- .../report_templates/JSONTOREPORT_DI_AI.php | 7 +- .../JSONTOREPORT_DI_AI_ADDON.php | 2 +- 5 files changed, 47 insertions(+), 34 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 41153749..e2741124 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -4765,7 +4765,7 @@ public function getPDFormDetailsJSON_post() { $temp = $this->load->view('report_templates/JSONTOREPORT_RI',$data,true); } - else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI') + else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SEP_INDV') { $temp = $this->load->view('report_templates/JSONTOREPORT_DI_AI',$data,true); } @@ -7292,6 +7292,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() case 5: case 6: case 7: + case 9: $score_questions = PDSCORE::genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details); break; } diff --git a/api/application/helpers/myutil_helper.php b/api/application/helpers/myutil_helper.php index 837c50ba..dd52d6a1 100644 --- a/api/application/helpers/myutil_helper.php +++ b/api/application/helpers/myutil_helper.php @@ -83,36 +83,47 @@ class MYUTIL $data['type_of_activity'] = $value['business_entity_type']==1 ? $value['business_entity_type_other'] : $value['business_entity_type_master']; //$getSentense .=' formed on '; //echo $data['type_of_activity']; - switch($value['business_entity_type']) + $CI=& get_instance(); + $CI->load->model('PD_Model'); + $business_entity_type = $CI->PD_Model->selectCustomRecords(array('*'),array('isactive' => 1),BUSINESSENTITYTYPE); + foreach($business_entity_type as $bn_key => $bn_value) { - case 1: - case 6: - case 9: - $data['partners_title_name'] = "Member Details"; - break; - case 2: - $data['partners_title_name'] = "Director / Shareholder Details"; - break; - case 3: - //echo '3'; - $data['partners_title_name'] = "Proprietor Details"; - break; - case 4: - $data['partners_title_name'] = "Karta Details"; - break; - case 5: - case 7: - $data['partners_title_name'] = "Partner Details"; - break; - case 8: - case 11: - $data['partners_title_name'] = "Director Details"; - break; - - case 10: - $data['partners_title_name'] = "Trustee Details"; - break; + if($value['business_entity_type'] == $bn_value['business_entity_type_id']) + { + $data['partners_title_name'] = $bn_value['section_label']; + break; + } } + // switch($value['business_entity_type']) + // { + // case 1: + // case 6: + // case 9: + // $data['partners_title_name'] = "Member Details"; + // break; + // case 2: + // $data['partners_title_name'] = "Director / Shareholder Details"; + // break; + // case 3: + // //echo '3'; + // $data['partners_title_name'] = "Proprietor Details"; + // break; + // case 4: + // $data['partners_title_name'] = "Karta Details"; + // break; + // case 5: + // case 7: + // $data['partners_title_name'] = "Partner Details"; + // break; + // case 8: + // case 11: + // $data['partners_title_name'] = "Director Details"; + // break; + + // case 10: + // $data['partners_title_name'] = "Trustee Details"; + // break; + // } $data['year_and_month']= $value['business_years'] . ' Year(s)'; $data['year_and_month'] .= isset($value['business_month']) && $value['business_month'] != "" ? ' and '.$value['business_month'] . ' Month(s)': ''; diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php index f56017f8..7871fc64 100644 --- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php +++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php @@ -1431,7 +1431,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){ foreach($businessRow['documents'] as $docValue){ - array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => 'document')); + array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => $docValue['document'])); } } //print_r($getDocuments); diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index b0e9d211..c8173016 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -1473,7 +1473,7 @@ if($total_no_of_business > 0) { } if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){ foreach($businessRow['documents'] as $docValue){ - array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => 'document')); + array_push($getDocuments,array('name' => $docValue['document'], 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => $docValue['document'])); } } //print_r($getDocuments); @@ -1483,7 +1483,7 @@ if($total_no_of_business > 0) { { foreach($pd_images[13] as $img_key => $img_value) { - if( $getDocument_value['key_name'] == $img_value['pd_document_title'] ) + if( !strcasecmp($getDocument_value['key_name'],$img_value['pd_document_title'] )) { $getDocuments[$getDocument_key]['img'] = $img_value['doc_url']; break; @@ -1508,6 +1508,7 @@ if($total_no_of_business > 0) { $business_entity_type_heading = 'Entity Type :'; } foreach($businessResult as $bKey=>$fetchRow){ + //print_r($fetchRow['company_details']);die(); ?>

@@ -1889,7 +1890,7 @@ if($total_no_of_business > 0) { $docValue['document'].'.', 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => 'document')); + array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => isset( $docValue['document_pic']) ? $docValue['document_pic'] : '','key_name' => $docValue['document'])); } } //print_r($getDocuments);