From 7029c2cdc90e91ac63f5aa1afa83ea6b62150173 Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Fri, 12 Nov 2021 18:44:13 +0530 Subject: [PATCH] bank scorecard fixes : ps --- api/application/controllers/PD_Controller.php | 10 ++++------ api/application/models/PD_Model.php | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index ce20b0e5..019be10a 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -6300,7 +6300,6 @@ public function getPDFormDetailsJSON_post() { //echo $data['pd_master_details'][0]['is_score_card_enabled'].'-'.$data['pd_master_details'][0]['customer_segment_abbr'];die(); $data['pd_score'] = $this->calculateScore($pdid); - //print_r( $data['pd_score']);die(); $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0; //echo $score_for_chart;die(); @@ -7767,7 +7766,6 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() //echo $loan_amt_from_loam_form; //seperate PD Scorable quesitons from JSON $score_questions = $this->seperateScoreQuestions($form_data,$pd_master_details); - //print_r($score_questions);die(); // echo "###################################"; //Get Pesrsonal Assets Grid Masters Details if((int)$loan_amt_from_loam_form >= 100000000 ) @@ -7842,7 +7840,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() #####General Form Questions######## $general_form = (json_decode($form_data[18][0]['processed_json'],true)); // echo "seperateScoreQuestions"; - //print_r($general_form);die(); + // print_r($general_form);die(); // - QNO (1.7) OTP AUTHENDICATION DONE @@ -8233,15 +8231,15 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() ######Business Banking ############## $business_bank_form = (json_decode($form_data[7][0]['processed_json'],true)); // here i am changed to 21 form-id to 7 form-id - //print_r($business_bank_form); $vintage = array(); if(array_key_exists('business_details',$business_bank_form)) { + foreach($business_bank_form['business_details'] as $banking) { - $year = $banking['vintage_year'] ? $banking['vintage_year'] : 0 ; - $month = $banking['vintage_month'] ? $banking['vintage_month'] : 0; + $year = $banking['vintage_year_business'] ? $banking['vintage_year_business'] : 0 ; + $month = $banking['vintage_month_business'] ? $banking['vintage_month_business'] : 0; $temp = $year.'.'.$month; $vintage = array_merge($vintage,array($temp)); } diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 514b4495..2dbfc0cb 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -2048,7 +2048,7 @@ class PD_Model extends SPARQ_Model { public function getScorablePDFormDetailsJSON($pdid) { - $array = array(1,2,4,5,11,13,18,19,20,21,22,10); + $array = array(1,2,4,5,7,11,13,18,19,20,21,22,10); $return_data = array(); foreach($array as $key => $value) {