RI NEW TEMPLATE AND PORT CHANGE
This commit is contained in:
parent
45148746f9
commit
59fa8ad0a3
@ -107,7 +107,8 @@ $db['dev'] = array(
|
||||
'compress' => FALSE,
|
||||
'stricton' => FALSE,
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
'save_queries' => TRUE,
|
||||
'port' => '2344'
|
||||
);
|
||||
|
||||
$db['test'] = array(
|
||||
@ -132,7 +133,8 @@ $db['test'] = array(
|
||||
'compress' => FALSE,
|
||||
'stricton' => FALSE,
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
'save_queries' => TRUE,
|
||||
'port' => '2344'
|
||||
);
|
||||
|
||||
$db['prod'] = array(
|
||||
@ -154,6 +156,7 @@ $db['prod'] = array(
|
||||
'compress' => FALSE,
|
||||
'stricton' => FALSE,
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
'save_queries' => TRUE,
|
||||
'port' => '2344'
|
||||
);
|
||||
|
||||
|
||||
@ -4586,8 +4586,15 @@ public function getPDFormDetailsJSON_post()
|
||||
$data['pd_images'][$i] = $this->PD_Model->getSignedPDDocsURL($pdid,$i);
|
||||
}
|
||||
|
||||
|
||||
$temp = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI')
|
||||
{
|
||||
$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')
|
||||
{
|
||||
$temp = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
}
|
||||
|
||||
|
||||
$pd_report_time = date('Y-m-d-H-i-s');
|
||||
$pd_report_store = $this->external_path.'/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
|
||||
@ -5597,7 +5604,7 @@ public function getPDFormDetailsJSON_post()
|
||||
//print_r($records);
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
//print_r($data['applicants_details']);die();
|
||||
print_r($data['pd_master_details']);die();
|
||||
$data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id']));
|
||||
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
@ -5607,12 +5614,13 @@ public function getPDFormDetailsJSON_post()
|
||||
//die();
|
||||
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
|
||||
// print_r($data['assessed_income_details']);
|
||||
//print_r($data['pd_master_details'][0]['is_score_card_enabled']);die();
|
||||
// echo "**************************";
|
||||
//$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] = 0)
|
||||
if($data['pd_master_details'][0]['is_score_card_enabled'] == 1)
|
||||
{
|
||||
$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();
|
||||
|
||||
@ -5632,8 +5640,8 @@ public function getPDFormDetailsJSON_post()
|
||||
file_put_contents(APPPATH.'/views/js/phantomchart.js',$exact_script,LOCK_EX);
|
||||
|
||||
$str = 'phantomjs '.APPPATH.'/views/js/phantomchart.js';
|
||||
exec($str,$ou);
|
||||
exec('phantom.exit();');
|
||||
// exec($str,$ou);
|
||||
// exec('phantom.exit();');
|
||||
|
||||
//print_r($ou);
|
||||
|
||||
@ -5667,11 +5675,18 @@ public function getPDFormDetailsJSON_post()
|
||||
//print_r($data['pd_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true));
|
||||
//die();
|
||||
//echo "*******************************************";
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI')
|
||||
{
|
||||
$t = $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')
|
||||
{
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
}
|
||||
//$t = $this->load->view('temp_html.html',null,true);
|
||||
//echo $t;
|
||||
//die();
|
||||
$t = file_get_contents($this->external_path ."/pd_reports/" . $pdid . "/sample.html");
|
||||
|
||||
$total_replaces = substr_count($t,'<span class="tooltip">');
|
||||
for($i = 0 ;$i < $total_replaces;$i++)
|
||||
{
|
||||
@ -5686,14 +5701,14 @@ public function getPDFormDetailsJSON_post()
|
||||
$t = substr_replace($t,'',strpos($t,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
|
||||
|
||||
}
|
||||
//echo $t;
|
||||
echo $t;
|
||||
|
||||
//$t = file_get_contents($this->external_path ."/pd_reports/" . $pdid . "/sample.html");
|
||||
$start_pos = strpos($t,'</script>');
|
||||
$end_pos = $start_pos + 10;
|
||||
$t = substr_replace($t,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
|
||||
$t = substr_replace($t,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
|
||||
$t = substr_replace($t,'</body></html>',-1,0);
|
||||
// $start_pos = strpos($t,'</script>');
|
||||
// $end_pos = $start_pos + 10;
|
||||
// $t = substr_replace($t,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
|
||||
// $t = substr_replace($t,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
|
||||
// $t = substr_replace($t,'</body></html>',-1,0);
|
||||
//file_put_contents($this->external_path ."/pd_reports/" . $pdid . "/sample2.html",$t);
|
||||
//PDF Gen using DOM PDF
|
||||
//$this->pdfgenerator->setEncryption('test1234');
|
||||
@ -6863,7 +6878,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
$score_questions = PDSCORE::genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid);
|
||||
$score_questions = PDSCORE::genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@ class PDSCORE
|
||||
}
|
||||
|
||||
|
||||
public static function genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid)
|
||||
public static function genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid,$pd_master_details)
|
||||
{
|
||||
|
||||
//echo 'RRRRR';die();
|
||||
//print_r($personal_asset_grid);die();echo "###################";
|
||||
############ GENERIC SE-DI CASES #######################
|
||||
############ SCROE VARIABLES DECLERATIONS ##############
|
||||
@ -92,31 +92,62 @@ class PDSCORE
|
||||
$over_all_general_round_l2 = 0;
|
||||
$general_distribute_level_weightage = 0;
|
||||
|
||||
//######1.5 neibourhood_check_as_per_pd_officer
|
||||
//General Section L2 Weightage Distribution section
|
||||
if($pd_master_details[0]['is_otp_enabled'] != 1)
|
||||
{
|
||||
$general_distribute_level_weightage += $otp_done_L2;
|
||||
}
|
||||
|
||||
if(!strcmp($score_questions['general']['neibourhood_check_as_per_pd_officer'],'Could not verify'))
|
||||
{
|
||||
//echo "Yes could not";
|
||||
$general_distribute_level_weightage += $neibourhood_check_as_per_pd_officer_L2;
|
||||
}
|
||||
|
||||
//End of General Section L2 Weightage Distribution section
|
||||
|
||||
|
||||
//######1.7 otp_done
|
||||
if($pd_master_details[0]['is_otp_enabled'] == 1)
|
||||
{
|
||||
$otp_done_L2 = $general_distribute_level_weightage ? ($otp_done_L2 + ($otp_done_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $otp_done_L2;
|
||||
|
||||
$otp_done_actual_score = ($l1_general/100) * ($otp_done_L2/100) * $otp_done[$score_questions['general']['otp_done']];
|
||||
|
||||
$otp_done_max_score = ($l1_general/100) * ($otp_done_L2/100) * max($otp_done);
|
||||
|
||||
$score_questions['general']['otp_done'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($otp_done_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['otp_done'],'attributed_score' => ($otp_done_actual_score), 'max_score' => ($otp_done_max_score),'score_band'=>$otp_done[$score_questions['general']['otp_done']],'max_score_band' => max($otp_done));
|
||||
}
|
||||
else
|
||||
{
|
||||
$score_questions['general']['otp_done'] = array('l1_weightage' => $l1_general,'l2_weightage' => 0,'distributed_weightage' => $general_distribute_level_weightage,'answer' => 'Not Applicable','attributed_score' => 0.00, 'max_score' => 0.00,'score_band'=>$otp_done[ $score_questions['general']['otp_done'] != "" || $score_questions['general']['otp_done'] != null ?$score_questions['general']['otp_done']: "No" ],'max_score_band' => 0);
|
||||
}
|
||||
|
||||
//######1.5 neibourhood_check_as_per_pd_officer
|
||||
if(!strcmp($score_questions['general']['neibourhood_check_as_per_pd_officer'],'Could not verify'))
|
||||
{
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = array('l1_weightage' => $l1_general,'l2_weightage' => 0,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['neibourhood_check_as_per_pd_officer'],'attributed_score' => 0.00, 'max_score' => 0.00,'score_band'=>$neibourhood_check_as_per_pd_officer[$score_questions['general']['neibourhood_check_as_per_pd_officer'] != "" || $score_questions['general']['neibourhood_check_as_per_pd_officer'] != null ?$score_questions['general']['neibourhood_check_as_per_pd_officer']: "Negative" ],'max_score_band' => 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$neibourhood_check_as_per_pd_officer_L2 = $general_distribute_level_weightage ? ($neibourhood_check_as_per_pd_officer_L2 + ($neibourhood_check_as_per_pd_officer_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $neibourhood_check_as_per_pd_officer_L2;
|
||||
|
||||
$neibourhood_check_as_per_pd_officer_actual_score = ($l1_general/100) * ($neibourhood_check_as_per_pd_officer_L2/100) * $neibourhood_check_as_per_pd_officer[$score_questions['general']['neibourhood_check_as_per_pd_officer'] != "" || $score_questions['general']['neibourhood_check_as_per_pd_officer'] != null ?$score_questions['general']['neibourhood_check_as_per_pd_officer']: "Negative" ];
|
||||
|
||||
$neibourhood_check_as_per_pd_officer_max_score = ($l1_general/100) * ($neibourhood_check_as_per_pd_officer_L2/100) * max($neibourhood_check_as_per_pd_officer);
|
||||
|
||||
$score_questions['general']['neibourhood_check_as_per_pd_officer'] = array('l1_weightage' => $l1_general,'l2_weightage' => $neibourhood_check_as_per_pd_officer_L2,'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['neibourhood_check_as_per_pd_officer'],'attributed_score' => ($neibourhood_check_as_per_pd_officer_actual_score), 'max_score' => ($neibourhood_check_as_per_pd_officer_max_score),'score_band'=>$neibourhood_check_as_per_pd_officer[$score_questions['general']['neibourhood_check_as_per_pd_officer'] != "" || $score_questions['general']['neibourhood_check_as_per_pd_officer'] != null ?$score_questions['general']['neibourhood_check_as_per_pd_officer']: "Negative" ],'max_score_band' => max($neibourhood_check_as_per_pd_officer));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//$general_distribute_level_weightage = round($general_distribute_level_weightage,2);
|
||||
|
||||
//echo $general_distribute_level_weightage = round($general_distribute_level_weightage,2);die();
|
||||
|
||||
//echo $general_distribute_level_weightage;
|
||||
|
||||
|
||||
|
||||
|
||||
//#######1.1 person_met_is_applicant
|
||||
|
||||
$person_met_is_applicant_L2 = $general_distribute_level_weightage ? ($person_met_is_applicant_L2 + ($person_met_is_applicant_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $person_met_is_applicant_L2 ;
|
||||
@ -170,15 +201,7 @@ class PDSCORE
|
||||
|
||||
$score_questions['general']['was_the_company_name_board_sighted'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($was_the_company_name_board_sighted_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['was_the_company_name_board_sighted'],'attributed_score' => ($was_the_company_name_board_sighted_actual_score), 'max_score' => ($was_the_company_name_board_sighted_max_score),'score_band'=>$was_the_company_name_board_sighted[$score_questions['general']['was_the_company_name_board_sighted']],'max_score_band' => max($was_the_company_name_board_sighted));
|
||||
|
||||
//######1.7 otp_done
|
||||
|
||||
$otp_done_L2 = $general_distribute_level_weightage ? ($otp_done_L2 + ($otp_done_L2 / (100 - $general_distribute_level_weightage )) * $general_distribute_level_weightage) : $otp_done_L2;
|
||||
|
||||
$otp_done_actual_score = ($l1_general/100) * ($otp_done_L2/100) * $otp_done[$score_questions['general']['otp_done']];
|
||||
|
||||
$otp_done_max_score = ($l1_general/100) * ($otp_done_L2/100) * max($otp_done);
|
||||
|
||||
$score_questions['general']['otp_done'] = array('l1_weightage' => $l1_general,'l2_weightage' => ($otp_done_L2),'distributed_weightage' => $general_distribute_level_weightage,'answer' => $score_questions['general']['otp_done'],'attributed_score' => ($otp_done_actual_score), 'max_score' => ($otp_done_max_score),'score_band'=>$otp_done[$score_questions['general']['otp_done']],'max_score_band' => max($otp_done));
|
||||
|
||||
//######1.8 qualification
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 43.2;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/production/pd_reports/1/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 75.5;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/testing/pd_reports/900/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
@ -504,7 +504,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo "<br><br>";
|
||||
echo "<p></p>";
|
||||
|
||||
if($lender_disclaimer[0]['disclaimer'] != '')
|
||||
if(isset($lender_disclaimer[0]['disclaimer']) && $lender_disclaimer[0]['disclaimer'] != '')
|
||||
{
|
||||
echo '<p align="justify"><i><strong>Disclaimer: </strong>'. $lender_disclaimer[0]['disclaimer'] .'</i></p>';
|
||||
|
||||
@ -734,7 +734,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
<!-- ########################### Score Card Section ############################################### -->
|
||||
<?php
|
||||
|
||||
//print_r($pd_score);die();
|
||||
if( isset($pd_score) && count($pd_score))
|
||||
{
|
||||
echo '<div id="page_break"> </div>';
|
||||
@ -842,6 +842,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$answer = isset($business_score['answer']) ? ((!strcasecmp($business_score['answer'], 'yes')) ? 'Seasonal': 'Not Seasonal') : '';
|
||||
}
|
||||
else if($bsk == 'vintage_of_business_account')
|
||||
{
|
||||
$answer = isset($business_score['answer']) ? $business_score['answer'] : 'No';
|
||||
}
|
||||
else
|
||||
{
|
||||
$answer = isset($business_score['answer']) ? $business_score['answer'] : '';
|
||||
|
||||
1759
api/application/views/report_templates/JSONTOREPORT_RI.php
Normal file
1759
api/application/views/report_templates/JSONTOREPORT_RI.php
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user