PD REPORT FEEDBACKS

This commit is contained in:
dineshkumarkannan 2019-06-18 23:12:10 +05:30
parent 61ff82bb25
commit 81288c22a3
8 changed files with 87 additions and 46 deletions

View File

@ -4162,7 +4162,7 @@ class PD_Controller extends REST_Controller {
//get zip url from s3 if any
$key = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
$key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
if($pd_master_details[0]['is_zip_created'])
{
@ -5129,7 +5129,7 @@ class PD_Controller extends REST_Controller {
//echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//$t = $this->load->view('temp_html.html',null,true);
echo $t;die();
//echo $t;die();
$total_replaces = substr_count($t,'<span class="tooltip">');
//echo $total_replaces;

Binary file not shown.

View File

@ -11,7 +11,7 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
$neighbourhood_do_know = null;
$neighbourhood_business_running_yr = null;
$ownership = null;
$neighbourhood_name_only = $tag['neighbourhood_name'];
if(strtoupper($tag['do_know'])=='YES'){
$neighbourhood_do_know = $tag['neighbourhood_name']." knows about applicants and their business.";
@ -68,7 +68,7 @@ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterVa
}
//$makeSentense.=(strtoupper($tag['is_applicant_owner']) == 'YES') ? "owner of the business." : ((strtoupper($tag['is_applicant_owner']) == 'NO') ? "not owner of the business." : "");
return array('neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
return array('neighbourhood_name_only' => $neighbourhood_name_only,'neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
}, $values);
return $values;
}

View File

@ -25,12 +25,13 @@ public static function getFamilyDetails($values){
$gender = array_search($tag['family_member_relationship'],$male_gender_array);
$gender = $gender ? 'He' :'She';
$getFamilyEarning='';
$year_to_display = $tag['earning_number_of_years_in_employment_or_business'] == 1 ? 'year.' : 'years.';
if($tag['family_member_earning_status']==1){
$getFamilyEarning= 'Earning ';
$getFamilyOccupation = $tag['earning_segment']==1 ? $tag['earning_if_others_segment'].' Income of '.$tag['earning_gross_income_per_month'].' per month. ':' Income of '.'<span style="font-family: DejaVu Sans; sans-serif;font-size:10px">₹</span>'.' '.MYUTIL::customIndianNumberFormat($tag['earning_gross_income_per_month']).' per month ';
$getFamilyOccupation .= $tag['earning_name_of_the_employer_or_business'] ? ' received from '.$tag['earning_name_of_the_employer_or_business'].'. ' : '';
$getFamilyOccupation .= $gender.' has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' years.';
$getFamilyOccupation .= $gender.' has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' '.$year_to_display;
// ? .' years earning Rs.'. : $tag['earning_segment_master'].' with '.$tag['earning_name_of_the_employer_or_business'].' since '.$tag['earning_number_of_years_in_employment_or_business'].' years earning Rs.'.$tag['earning_gross_income_per_month'].' per month ';
}

View File

@ -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 = 99.9;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 = 45.6;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

View File

@ -557,24 +557,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<div id="page_break"></div>';
echo '<p><strong>Person(s) Met:</strong> </p>';
echo '<div id="billwise">';
echo '<div style="border: 1px solid #0191ed;">';
foreach($person_met_data as $pk => $person)
{
echo '<p>'.$person['name'].'</p>';
echo '<p>'.substr_replace($person['relations'],'.',strrpos($person['relations'],','),1).'</p>';
echo '<br><br><p>';
$display_for_person_met =$person['relations'] != "" ? substr_replace($person['relations'],'.',strrpos($person['relations'],','),1) : '';
//echo '<div id="billwise">';
echo '<p>'.$person['name'].' - '.$display_for_person_met.'</p>';
//echo '<p>'.$display_for_person_met.'</p>';
if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
}
if($person['photo'])
{
echo '<img src='.$person['photo'].' width="400px" height="300px" alt=""/>';
echo '<img src='.$person['photo'].' width="290px" height="200px" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
//echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src='.$person['id_proof'].' width="400px" height="300px" alt=""/>';
echo '<img src='.$person['id_proof'].' width="290px" height="200px" alt=""/>';
}
echo '</p>';
//echo '</p>';
echo count($person_met_data) != ($pk+1)? '<hr>':'';
//echo '</div>';
}
echo '</div>';
@ -692,14 +696,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
</tbody>
</table>
<div id="page_break"> </div>
<?php
//
// if($general_form['general_remark'] != "") { ?>
<!-- <p>PD Officers Note (About General Section) :</p> --><?php //echo $general_form['general_remark'];
// }
?>
if($general_form['general_remark'] != "") { ?>
<!-- <p>PD Officers Note (About General Section) :</p> -->
<?php
echo '<p>'.$general_form['general_remark'].'</p>';
}
?>
<div id="page_break"> </div>
<!-- ########################### End of Cover Page Section ####################################-->
@ -769,7 +776,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<div id='page_break'></div>";
//######################### CHART ###########################
}
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Shared >>", "minimum_client_info" => "Client Information Shared >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
@ -789,7 +796,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$per = $business_score['attributed_score'] > 0 && $business_score['max_score'] > 0 ? ( ($business_score['attributed_score'] / $business_score['max_score']) * 100) : 0;
$class = ( $per >= 80 ? 'rcorners_green' : $per >= 70 && $per < 80 ? 'rcorners_light_green' : $per >= 60 && $per < 70 ? 'rcorners_amber' : 'rcorners_red');
if($bsk == 'location_suited_for_busienss')
{
$answer = $address_type_remarks_caption[ $business_score['answer'] ];
@ -798,9 +806,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
$answer = $per > 0 ? 'Yes' : 'No';
}
else if($bsk == 'no_of_years_business_run')
{
$answer = isset($business_score['answer']) ? $business_score['answer'].' Yrs' : '';
}
else if($bsk == 'business_seasonality')
{
$answer = isset($business_score['answer']) ? ((!strcasecmp($business_score['answer'], 'yes')) ? 'Seasonal': 'Not Seasonal') : '';
}
else
{
$answer = isset($business_score['answer']) ? $business_score['answer'] : 'WAIT';
$answer = isset($business_score['answer']) ? $business_score['answer'] : '';
}
echo '<tr> <td style="width:70%;">'. $business_captions[$bsk] .'</td> <td style="width:30%;">'. '<div id="'. $class .'"></div></td> <td class="customtd">'. ucfirst($answer).'</td> </tr>';
@ -819,9 +835,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$per = $general_score['attributed_score'] > 0 && $general_score['max_score'] > 0 ? ( ($general_score['attributed_score'] / $general_score['max_score']) * 100) : 0;
$class = ( $per >= 80 ? 'rcorners_green' : $per >= 70 && $per < 80 ? 'rcorners_light_green' : $per >= 60 && $per < 70 ? 'rcorners_amber' : 'rcorners_red');
$answer = ucfirst($general_score['answer']);
if($gsk == 'value_of_other_assets')
{
//print_r($general_score);die();
$answer = round((($answer/$loan_form['loan_amount']) * 100),2) .' %';
}
echo '<tr> <td style="width:70%;">'. $general_captions[$gsk] .'</td> <td style="width:30%;">'. '<div id="'. $class .'"></div></td> <td class="customtd">'. ucfirst($general_score['answer']).'</td> </tr>';
echo '<tr> <td style="width:70%;">'. $general_captions[$gsk] .'</td> <td style="width:30%;">'. '<div id="'. $class .'"></div></td> <td class="customtd">'. $answer.'</td> </tr>';
}
echo '</tbody>';
echo '</table>';
@ -858,6 +881,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$final_remark_data = json_decode($pd_processed_forms[20][0]['processed_json'],true) ;
$business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true);
$address_images = $pd_images[5];
$pd_location_approach_img_url = '';
foreach ($address_images as $address_image_key => $address_image_value) {
if($address_image_value['is_show_report'] == 1)
{
$pd_location_approach_img_url = $address_image_value['doc_url'];
break;
}
}
//print_r($address_images);die();
?>
<div id="page_break"></div>
<p><b>PD LOCATION</b></p>
@ -872,12 +906,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<img border="3" src =<?php echo $pd_master_details[0]['satellite_image_base64_blob'];?> alt="Satellite Image of location of Where PD was Done" style="width:100%;height:300px;border-color:#0191ed" /><br><br><br>
<!-- <table style="width:70%;"><tr><td>
<img border="3" src ='https://www.thebalancesmb.com/thmb/3m0NLM8sjcFYHuafG77k7v4st1A=/735x0/515580866-573f839e3df78c6bb01f3bc3.jpg' alt="Approch to PD Location" style="width:100%;height:300px;border-color:#0191ed" />
<table>
<thead>
<tr> <th>PD Location Approach</th> <th>Name Board of Business</th> </tr>
</thead>
<tr><td>
<img border="3" src ="<?php echo $pd_location_approach_img_url;?>" style="width:50%;height:300px;border-color:#0191ed" alt="https://www.bigblue.co.za/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/n/o/not-captured.jpg"/>
</td><td>
<img border="3" src ='https://www.thebalancesmb.com/thmb/3m0NLM8sjcFYHuafG77k7v4st1A=/735x0/515580866-573f839e3df78c6bb01f3bc3.jpg' alt="Name Board" style="width:100%;height:300px;border-color:#0191ed" /> </td>
<img border="3" src ='http://www.jrwald.com/uploads/5/6/9/6/56965327/3240978-1-orig_orig.jpg' alt="Name Board" style="width:50%;height:300px;border-color:#0191ed" /> </td>
</tr>
</table> -->
</table>
<div id="page_break"></div>
<br><p><b>Location Summary</b></p>
<?php
@ -1256,7 +1295,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//
if(count($fetchRow['manufacturing']) >0){ ?>
<div>
<p> Type of Business Activity : Manufacturing</p>
<!-- <p> Type of Business Activity : Manufacturing</p> -->
</div>
<table class="scorecard_table">
@ -1308,7 +1347,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php if(count($fetchRow['retail']) >0){ ?>
<div>
<p> Type of Business Activity : Retail Trading</p>
<!-- <p> Type of Business Activity : Retail Trading</p> -->
</div>
<table class="scorecard_table">
@ -1359,7 +1398,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php if(count($fetchRow['serviceprovider']) >0){ ?>
<div>
<p> Type of Business Activity : Service Provider</p>
<!-- <p> Type of Business Activity : Service Provider</p> -->
</div>
<table class="scorecard_table">
@ -1411,7 +1450,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php if(count($fetchRow['wholesale']) >0){ ?>
<div>
<p> Type of Business Activity : Wholesale Trading</p>
<!-- <p> Type of Business Activity : Wholesale Trading</p> -->
</div>
<table class="scorecard_table">
@ -1469,7 +1508,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<!-- start other activity-->
<?php if(count($fetchRow['otheractivity']) >0){ ?>
<div>
<p> Other activity details are as under :</p>
<!-- <p> Other activity details are as under :</p> -->
</div>
<table class="scorecard_table">
@ -1495,7 +1534,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php
if(!strcasecmp($fetchRow['applicant_use_mobile_wallets'],'yes'))
{
echo '<p>As per person`s met,applicant using Mobile Wallets/UPI for business transactions.</p>';
echo '<p>As per person`s met, applicant using Mobile Wallets/UPI for business transactions.</p>';
}//else
//{
// echo '<p>As per person`s met,applicant using Mobile Wallets/UPI for business transactions.</p>'
@ -1911,7 +1950,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}?>
</tbody>
</table>
<?php }else{echo "<p>The Loan Applicants have not availed any Working Capital Facilities from any financial institution<p>";} ?>
<?php }else{echo "<p>The Loan Applicants have not availed any Working Capital Facilities from any financial institution.<p>";} ?>
<?php
@ -3250,7 +3289,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//
}
else {?>
<p>As per loan applicant he does not have any existing loan obligations</p>
<p>As per loan applicant he does not have any existing loan obligations.</p>
<?php } ?>
<?php
if($existing_loan_form_common_remarks != ""){ echo '<p>'.$existing_loan_form_common_remarks.'</p>';}
@ -3293,7 +3332,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php foreach($existNeighRefCheck as $nkey => $nfValue) {
echo '<br>Neighbour '.(++$nkey);
echo $nfValue['neighbourhood_name_only'];
?>
<ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -60,13 +60,13 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
rule: '%v >= 80',
text: '%v<br>EXCELLENT'
}, {
rule: '%v < 80 && %v > 60',
rule: '%v < 80 && %v >= 65',
text: '%v<br>Good'
}, {
rule: '%v < 60&& %v > 30',
rule: '%v < 65 && %v >= 50',
text: '%v<br>Fair'
}, {
rule: '%v <= 30',
rule: '%v <= 49',
text: '%v<br>Poor'
}]
}
@ -78,7 +78,7 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
aperture: 180,
minValue: 0,
maxValue: 100,
step: 10,
step: 5,
center: {
visible: false
},
@ -92,17 +92,18 @@ $score = substr($_SERVER['REQUEST_URI'],(strripos($_SERVER['REQUEST_URI'],"?")+1
offsetX: 15
}]
},
labels: ['0', '10', '20','30', '40', '50', '60', '70', '80', '90', '100'],
//labels: ['0', '10', '20','30', '40', '50', '60', '70', '80', '90', '100'],
labels: ['0', '10', '10','30', '20', '50', '30', '70', '40', '90', '50'],
ring: {
size: 65,
rules: [{
rule: '%v <= 40',
rule: '%v <= 49',
backgroundColor: '#E53935',
}, {
rule: '%v > 40 && %v < 70',
rule: '%v < 65 && %v >= 50',
backgroundColor: '#ff9900'
}, {
rule: '%v >= 70 && %v < 80',
rule: '%v < 80 && %v >= 65',
backgroundColor: '#99ff66'
}, {
rule: '%v >= 80',