diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 8d5baf5c..f479acd5 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -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
diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf
index 1e7b1831..ae08045b 100644
Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ
diff --git a/api/application/helpers/financialform_helper.php b/api/application/helpers/financialform_helper.php
index fafa6dae..ff11e117 100644
--- a/api/application/helpers/financialform_helper.php
+++ b/api/application/helpers/financialform_helper.php
@@ -52,7 +52,7 @@ public static function getOtherLoanDetails($values){
$first_row .= $tag['loan_type']==1 ? '
'.$tag['others_loan_type'].' | ' : ''.$tag['loan_type_master'] .' | ';
- $second_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' | ';
+ $second_row .= ''.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' | ';
//$third_row = ''.MYUTIL::customIndianNumberFormat($tag['loan_amount']).' | ';
@@ -60,7 +60,7 @@ public static function getOtherLoanDetails($values){
$fifth_row .= $loanTaken['id']==0 ? ''.$tag['others_loan_taken'].' | ' : ''.$loanTaken['name'].' | ';
- $sixth_row .= ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($tag['emi']).' | ';
+ $sixth_row .= ''.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['emi']).' | ';
$seventh_row .= $tag['frequency']==1 ? ''.$tag['other_frequency'].' | ' : ''.$tag['frequency_master'].' | ';
diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php
index 467204db..2a4d253d 100644
--- a/api/application/helpers/getprocessedjson_helper.php
+++ b/api/application/helpers/getprocessedjson_helper.php
@@ -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;
}
}
diff --git a/api/application/helpers/myutil_helper.php b/api/application/helpers/myutil_helper.php
index fd717c19..979390e8 100644
--- a/api/application/helpers/myutil_helper.php
+++ b/api/application/helpers/myutil_helper.php
@@ -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)
{
diff --git a/api/application/helpers/neighbourreferencecheckform_helper.php b/api/application/helpers/neighbourreferencecheckform_helper.php
index c04e7c0d..22b0d0db 100644
--- a/api/application/helpers/neighbourreferencecheckform_helper.php
+++ b/api/application/helpers/neighbourreferencecheckform_helper.php
@@ -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);
diff --git a/api/application/helpers/otherfamilyform_helper.php b/api/application/helpers/otherfamilyform_helper.php
index 422c0e28..657892e1 100644
--- a/api/application/helpers/otherfamilyform_helper.php
+++ b/api/application/helpers/otherfamilyform_helper.php
@@ -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'] .='.';
diff --git a/api/application/views/js/phantomchart.js b/api/application/views/js/phantomchart.js
index 531959a1..592eb51e 100644
--- a/api/application/views/js/phantomchart.js
+++ b/api/application/views/js/phantomchart.js
@@ -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);});
\ No newline at end of file
+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);});
\ No newline at end of file
diff --git a/api/application/views/js/phantomdsc.js b/api/application/views/js/phantomdsc.js
index 17e36e0f..0e8ad4e9 100644
--- a/api/application/views/js/phantomdsc.js
+++ b/api/application/views/js/phantomdsc.js
@@ -1 +1 @@
-var wpage = require('webpage').create();var Content = ' ';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();};
\ No newline at end of file
+var wpage = require('webpage').create();var Content = ' ';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();};
\ No newline at end of file
diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php
index f77fb9af..90efdef2 100644
--- a/api/application/views/report_templates/JSONTOREPORT.php
+++ b/api/application/views/report_templates/JSONTOREPORT.php
@@ -342,6 +342,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$all_company_details = $general_form['companies'];
}
+ $all_applicant_details = $applicants_details;
+
?>
$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){
diff --git a/api/application/views/report_templates/chart.png b/api/application/views/report_templates/chart.png
index a1d1609d..bc6e8027 100644
Binary files a/api/application/views/report_templates/chart.png and b/api/application/views/report_templates/chart.png differ
diff --git a/api/application/views/report_templates/dsc_business.png b/api/application/views/report_templates/dsc_business.png
index 2d1ac575..f5ce876b 100644
Binary files a/api/application/views/report_templates/dsc_business.png and b/api/application/views/report_templates/dsc_business.png differ
diff --git a/api/application/views/report_templates/dsc_general.png b/api/application/views/report_templates/dsc_general.png
index fb2126e3..e4a72fcd 100644
Binary files a/api/application/views/report_templates/dsc_general.png and b/api/application/views/report_templates/dsc_general.png differ