PD REPORT ISSUES FIXED
This commit is contained in:
parent
6fdcfa5e60
commit
e4c4198414
@ -3934,7 +3934,7 @@ class PD_Controller extends REST_Controller {
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
$data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid);
|
||||
$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
|
||||
$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;
|
||||
|
||||
//GET phantom script from DB
|
||||
@ -3973,6 +3973,9 @@ class PD_Controller extends REST_Controller {
|
||||
$fields = array('processed_json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_pd_id'=>$pdid,'fk_form_id' => $i);
|
||||
$data['pd_processed_forms'][$i] = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON,array(),'','company_id','ASC');
|
||||
|
||||
$fields2 = array('*');
|
||||
$data['pd_images'][$i] = $this->PD_Model->getSignedPDDocsURL($pdid,$i);
|
||||
}
|
||||
|
||||
|
||||
@ -4782,9 +4785,9 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
|
||||
// Incase running from local windows (Velz sys)
|
||||
$dsc_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantom_dsc_local'),SCRIPTS);
|
||||
//$dsc_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantom_dsc_local'),SCRIPTS);
|
||||
|
||||
//$dsc_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => DETAILED_SCORE_CARD_IMAGE_LOCATION),SCRIPTS);
|
||||
$dsc_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => DETAILED_SCORE_CARD_IMAGE_LOCATION),SCRIPTS);
|
||||
|
||||
if(count($dsc_script_from_db))
|
||||
{
|
||||
@ -4872,6 +4875,7 @@ class PD_Controller extends REST_Controller {
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
//print_r($data['applicants_details']);die();
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
@ -4881,11 +4885,11 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
// print_r($data['assessed_income_details']);
|
||||
// echo "**************************";
|
||||
$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
//$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] );
|
||||
|
||||
$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();
|
||||
$chart = 1;
|
||||
$chart = null;
|
||||
if($chart)
|
||||
{
|
||||
//GET phantom script from DB
|
||||
|
||||
Binary file not shown.
@ -52,7 +52,7 @@ public static function getOtherLoanDetails($values){
|
||||
|
||||
$first_row .= $tag['loan_type']==1 ? '<td class="customtd">'.$tag['others_loan_type'].'</td>' : '<td class="customtd">'.$tag['loan_type_master'] .'</td>';
|
||||
|
||||
$second_row .= '<td class="customtd">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
$second_row .= '<td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
|
||||
//$third_row = '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
|
||||
|
||||
@ -60,7 +60,7 @@ public static function getOtherLoanDetails($values){
|
||||
|
||||
$fifth_row .= $loanTaken['id']==0 ? '<td class="customtd">'.$tag['others_loan_taken'].'</td>' : '<td class="customtd">'.$loanTaken['name'].'</td>';
|
||||
|
||||
$sixth_row .= '<td class="customtd">'.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['emi']).'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['emi']).'</td>';
|
||||
|
||||
$seventh_row .= $tag['frequency']==1 ? '<td class="customtd">'.$tag['other_frequency'].'</td>' : '<td class="customtd">'.$tag['frequency_master'].'</td>';
|
||||
|
||||
|
||||
@ -662,17 +662,19 @@ class GETPROCESSEDJSON
|
||||
|
||||
if(array_key_exists('selected_person',$family_details))
|
||||
{
|
||||
$CI->db->SELECT( $master_tables_field_names['PDAPPLICANTSDETAILS'] );
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS);
|
||||
//$CI->db->WHERE('isactive',1);
|
||||
$CI->db->SELECT( 'PDAPPLICANTSDETAILS.applicant_name,TITLES.name' );
|
||||
$CI->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
|
||||
$CI->db->JOIN(TITLES.' as TITLES','PDAPPLICANTSDETAILS.applicant_title_name = TITLES.title_id','LEFT');
|
||||
$CI->db->WHERE( $master_tables_pkid['PDAPPLICANTSDETAILS'] ,$family_details['selected_person']);
|
||||
$owner= $CI->db->GET()->result_array();
|
||||
// print_r($CI->db->last_query());
|
||||
// print_r($CI->db->last_query());die();
|
||||
// print_r($owner);
|
||||
if(count($owner))
|
||||
{
|
||||
$selected_person_master = $owner[0][$master_tables_field_names['PDAPPLICANTSDETAILS']];
|
||||
$selected_person_title_master = $owner[0]['name'];
|
||||
$raw_json['family_details'][$family_details_key]['selected_person_master'] = $selected_person_master;
|
||||
$raw_json['family_details'][$family_details_key]['selected_person_title_master'] = $selected_person_title_master;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,6 +128,20 @@ class MYUTIL
|
||||
return 'Company Not Found';
|
||||
}
|
||||
}
|
||||
|
||||
public static function applicantTitleName($applicant_array,$id)
|
||||
{
|
||||
$t = null;
|
||||
foreach($applicant_array as $applicant)
|
||||
{
|
||||
if($applicant['pd_co_applicant_id'] == $id)
|
||||
{
|
||||
$t = $applicant['title_name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $t;
|
||||
}
|
||||
|
||||
public static function findQuestionByKey($array,$qkey)
|
||||
{
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
|
||||
class Neighbourreferencecheckform
|
||||
{
|
||||
public static function getNeighbourhoodDetails($company_name,$values,$pdMasterValue){
|
||||
public static function getNeighbourhoodDetails($company_name,$values,$pdMasterValue,$applicants_details){
|
||||
//print_r($applicants_details);die();
|
||||
$applicantName=$pdMasterValue['main_applicant'];
|
||||
$values = array_map(function($tag) use ($applicantName,$company_name) {
|
||||
$values = array_map(function($tag) use ($applicantName,$company_name,$applicants_details) {
|
||||
$neighbourhood_name='Neighbour Check was done with ';
|
||||
$neighbourhood_name.= $tag['neighbourhood_name'].'.';
|
||||
$neighbourhood_do_know = null;
|
||||
@ -36,7 +37,8 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
|
||||
{
|
||||
if($owner['id'] != 0)
|
||||
{
|
||||
$ownwers_list .= $owner['name'].',';
|
||||
$title = MYUTIL::applicantTitleName($applicants_details,$owner['id']);
|
||||
$ownwers_list .= $title.$owner['name'].',';
|
||||
|
||||
}
|
||||
else
|
||||
@ -44,8 +46,9 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
|
||||
$ownwers_list .= ' '.$tag['other_organisation_owner'].',';
|
||||
}
|
||||
}
|
||||
|
||||
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
|
||||
//echo $ownwers_list;
|
||||
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
|
||||
//echo $ownwers_list;
|
||||
if(count($tag['organisation_owner']) == 1)
|
||||
{
|
||||
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
|
||||
|
||||
@ -8,7 +8,9 @@ public static function getFamilyDetails($values){
|
||||
foreach($values as $fetchVal){
|
||||
//print_r($fetchVal);die();
|
||||
$storeValue=array();
|
||||
$storeValue['selected_person']= isset($fetchVal['selected_person_master']) ? $fetchVal['selected_person_master'] : $fetchVal['selected_person'];
|
||||
$storeValue['selected_person_title']= isset($fetchVal['selected_person_title_master']) ? $fetchVal['selected_person_title_master'] : '';
|
||||
|
||||
$storeValue['selected_person']= isset($fetchVal['selected_person_master']) ? $fetchVal['selected_person_master'] : $fetchVal['selected_person'];
|
||||
$storeValue['residency_address']=$fetchVal['residence_place'].' in, '.$fetchVal['residence_city_master'].', '.$fetchVal['residence_state_master'].'-';
|
||||
$storeValue['residency_address'] .=($fetchVal['residence_pin'] == 1) ? $fetchVal['residence_other_pincode'] : (($fetchVal['residence_pin'] > 1) ? $fetchVal['residence_pincode_master'] : "");
|
||||
//$storeValue['residency_address'] .='.';
|
||||
|
||||
@ -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 = 91.1;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/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 = 91.3;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
@ -1 +1 @@
|
||||
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Other PD Parameters","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["Asset Value by Loan Amount% >>","Business Board Sighted >>","Neighbourhood check >>","Customer Behaviour >>","Approach to PD location >>","Comment on Locality >>","Qualification of Loan Applicants >>","Is person Met, a loan applicant >>","OTP authentication done >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,100,100,70,70,100,100,100,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc_general.png'); phantom.exit();};
|
||||
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Other PD Parameters","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["Asset Value by Loan Amount% >>","Business Board Sighted >>","Neighbourhood check >>","Customer Behaviour >>","Approach to PD location >>","Comment on Locality >>","Qualification of Loan Applicants >>","Is person Met, a loan applicant >>","OTP authentication done >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,100,100,70,100,80,100,0,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc_general.png'); phantom.exit();};
|
||||
@ -342,6 +342,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$all_company_details = $general_form['companies'];
|
||||
}
|
||||
|
||||
$all_applicant_details = $applicants_details;
|
||||
|
||||
?>
|
||||
<!--<p>Person(s) Met: </p>
|
||||
<table class="simpletable">
|
||||
@ -742,7 +744,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution);
|
||||
}
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).'('.MYUTIL::numtowords($loan_form['emi_level']).')' );
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')' );
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => $loan_form['property_type_master']);
|
||||
|
||||
@ -752,7 +754,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']);
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).'('.MYUTIL::numtowords($loan_form['emv_per_customer']).')');
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).' ('.MYUTIL::numtowords($loan_form['emv_per_customer']).')');
|
||||
|
||||
//print_r($loan_table_dispaly_rows);die();
|
||||
?>
|
||||
@ -2610,7 +2612,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php foreach($familyResult as $fmKey => $fmValue) { ?>
|
||||
<!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> -->
|
||||
<?php
|
||||
$intro_text = $fmValue['selected_person'].", who is an applicant in the case, resides at ".$fmValue['residency_address'].'.';
|
||||
$intro_text = $fmValue['selected_person_title'].$fmValue['selected_person'].", who is an applicant in the case, resides at ".$fmValue['residency_address'].'.';
|
||||
|
||||
$residence_text = "This is a ". $fmValue['residence_ownership']." residence, where the applicant has been staying for ". $fmValue['residence_No_of_years'].'.';
|
||||
$residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? 'The rent paid Rs.'.$fmValue['rent'].'per month.' : '';
|
||||
@ -2720,6 +2722,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$pd_offiecer_status_about_neighbor = "";
|
||||
foreach($pd_processed_forms[19] as $rowKey=> $nrcRow) {
|
||||
$neighbourRefRow = json_decode($nrcRow['processed_json'],true);
|
||||
//print_r($applicants_details);die();
|
||||
//print_r($neighbourRefRow);
|
||||
//die();
|
||||
if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){
|
||||
@ -2727,7 +2730,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(count($neighbourRefRow['neighbourhood_list'])>0){
|
||||
$company_name = MYUTIL::findCompanyName($all_company_details,1,1);
|
||||
|
||||
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0]);
|
||||
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0],$applicants_details);//applicants_details comes from controller
|
||||
}
|
||||
}
|
||||
// if(&& count($neighbourRefRow['referencecheck_list'])>0){
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue
Block a user