DETAILED SCORE CARD
This commit is contained in:
parent
3d53b7c9ce
commit
cf95d4a350
@ -94,6 +94,7 @@ defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','
|
||||
if(ENVIRONMENT == 'development')
|
||||
{
|
||||
defined('SATELLITE_IMAGE_LOCATION') OR define('SATELLITE_IMAGE_LOCATION','phantomsatellite_dev');
|
||||
defined('DETAILED_SCORE_CARD_IMAGE_LOCATION') OR define('DETAILED_SCORE_CARD_IMAGE_LOCATION','phantom_dsc_dev');
|
||||
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','lender');
|
||||
defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_dev');
|
||||
defined('LOGTOBOT') OR define('LOGTOBOT',0);
|
||||
@ -102,6 +103,7 @@ defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIza
|
||||
else if(ENVIRONMENT == 'testing')
|
||||
{
|
||||
defined('SATELLITE_IMAGE_LOCATION') OR define('SATELLITE_IMAGE_LOCATION','phantomsatellite_test');
|
||||
defined('DETAILED_SCORE_CARD_IMAGE_LOCATION') OR define('DETAILED_SCORE_CARD_IMAGE_LOCATION','phantom_dsc_test');
|
||||
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','len');
|
||||
defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_test');
|
||||
defined('LOGTOBOT') OR define('LOGTOBOT',0);
|
||||
|
||||
@ -785,9 +785,9 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
}
|
||||
|
||||
print_r($pd_details);
|
||||
}
|
||||
|
||||
die();
|
||||
|
||||
if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == TRIGGERED || $pd_details['pd_status'] == INITIATED))
|
||||
{
|
||||
@ -3931,7 +3931,7 @@ class PD_Controller extends REST_Controller {
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly($pdid);
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
|
||||
$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'],2) : 0;
|
||||
//echo $score_for_chart;
|
||||
|
||||
@ -4698,18 +4698,26 @@ class PD_Controller extends REST_Controller {
|
||||
function getSatelliteImage($pd_id)
|
||||
{
|
||||
$pdid = $pd_id;
|
||||
$pdmas = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
|
||||
$pdmas = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
print_r($pdmas);
|
||||
//load satellite script from db
|
||||
//$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomsatellite_local'),SCRIPTS);
|
||||
$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => SATELLITE_IMAGE_LOCATION),SCRIPTS);
|
||||
$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomsatellite_local'),SCRIPTS);
|
||||
//$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => SATELLITE_IMAGE_LOCATION),SCRIPTS);
|
||||
$satellite_script = $satellite_script_from_db[0]['script_content'];
|
||||
|
||||
|
||||
//Get Address Data
|
||||
$address =$pdmas[0]['addressline1'].','.$pdmas[0]['city_name'].','.$pdmas[0]['state_name'];
|
||||
echo $pdmas[0]['addressline1'];
|
||||
$address = $pdmas[0]['addressline1'].','.$pdmas[0]['city_name'].','.$pdmas[0]['state_name'];
|
||||
echo $address;
|
||||
//Replacing space with + symbol
|
||||
$address =str_replace(' ','+',$address);
|
||||
$address =str_replace('\n','+',$address);
|
||||
$geo_location = $pdmas[0]['start_location'];
|
||||
$google_map_static_api_key = GOOGLE_STATIC_MAP_API_KEY;
|
||||
|
||||
echo "*****";
|
||||
echo $address;
|
||||
|
||||
|
||||
//Replacing Place holders
|
||||
@ -4717,6 +4725,7 @@ class PD_Controller extends REST_Controller {
|
||||
$satellite_script = str_replace('{{GEOLOCATION}}',$geo_location,$satellite_script);
|
||||
$satellite_script = str_replace('{{API_KEY}}',$google_map_static_api_key,$satellite_script);
|
||||
|
||||
echo $satellite_script;die();
|
||||
file_put_contents(APPPATH.'/views/js/phantomsatellite.js',$satellite_script);
|
||||
|
||||
//call& execute phantom script
|
||||
@ -4734,11 +4743,65 @@ class PD_Controller extends REST_Controller {
|
||||
return $base64_pdscore_chart_url;
|
||||
|
||||
}
|
||||
|
||||
function getDetailedScoreCardChart($score)
|
||||
{
|
||||
|
||||
$business_score['business'] = $score['business'];
|
||||
//$general_score['general'] = array_merge($score['general'],$score['final_remarks']);
|
||||
$general_score['general'] = $score['general'];
|
||||
|
||||
// print_r($general_score['general']);die();
|
||||
|
||||
$data = array();
|
||||
$img_name = '';
|
||||
|
||||
for($i = 1;$i < 3;$i++)
|
||||
{
|
||||
|
||||
// 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' => DETAILED_SCORE_CARD_IMAGE_LOCATION),SCRIPTS);
|
||||
|
||||
$dsc_script_from_db = $dsc_script_from_db[0]['script_content'];
|
||||
//print_r($dsc_script_from_db);
|
||||
|
||||
$html_content = "";
|
||||
if($i == 1){ $html_content = $this->load->view('business_scorecard',$business_score,true); }
|
||||
|
||||
else if($i == 2) { $html_content = $this->load->view('general_scorecard',$general_score,true);}
|
||||
//print_r($html_content);
|
||||
$dsc_script_from_db = str_replace('{{html_content}}',$html_content,$dsc_script_from_db);
|
||||
$dsc_script_from_db = $i == 1 ? str_replace('{{img_name}}','dsc_business',$dsc_script_from_db) : str_replace('{{img_name}}','dsc_general',$dsc_script_from_db);
|
||||
//echo $dsc_script_from_db;
|
||||
//echo "*************";
|
||||
file_put_contents(APPPATH.'/views/js/phantomdsc.js',$dsc_script_from_db);
|
||||
|
||||
//call& execute phantom script
|
||||
$str = 'phantomjs '.APPPATH.'/views/js/phantomdsc.js';
|
||||
exec($str,$ou);
|
||||
exec('phantom.exit();');
|
||||
|
||||
|
||||
// //convert as base 64 image.
|
||||
$dsc_image_png_path = $i == 1 ? APPPATH.'/views/report_templates/dsc_business.png' : APPPATH.'/views/report_templates/dsc_general.png';
|
||||
$type = pathinfo($dsc_image_png_path, PATHINFO_EXTENSION);
|
||||
$dsc_img_content = file_get_contents($dsc_image_png_path);
|
||||
$base64_dsc_url = 'data:image/' . $type . ';base64,' . base64_encode($dsc_img_content);
|
||||
if($i == 1){ $data['base64_dsc_business'] = $base64_dsc_url; }
|
||||
else if($i == 2){ $data['base64_dsc_general'] = $base64_dsc_url; }
|
||||
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function codeigniterViewTest_post()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
$is_regenerate = 0;
|
||||
@ -4750,21 +4813,14 @@ class PD_Controller extends REST_Controller {
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
$data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
$data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
|
||||
$data['pd_score'] = $this->calculateScore($pdid);
|
||||
|
||||
$remp = array();
|
||||
foreach($data['pd_score']['general'] as $key => $da)
|
||||
{
|
||||
//$remp = array_merge($remp,array($key => (string)($da['attributed_score'] * 100)));
|
||||
$remp = array_merge($remp,array($key));
|
||||
}
|
||||
print_r($remp);
|
||||
//die();
|
||||
print_r(json_encode($remp,true));die();
|
||||
// $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
|
||||
$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'],2) : 0;
|
||||
//echo $score_for_chart;
|
||||
$chart = null;
|
||||
$chart = 1;
|
||||
if($chart)
|
||||
{
|
||||
//GET phantom script from DB
|
||||
|
||||
Binary file not shown.
@ -1,114 +0,0 @@
|
||||
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
?>
|
||||
<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": "Detailed PD Score",
|
||||
"font-family": "Arial",
|
||||
"background-color": "none",
|
||||
"font-color": "#A4A4A4",
|
||||
"font-size": "14px"
|
||||
},
|
||||
"plot": {
|
||||
"borderRadius": 8,
|
||||
"hover-state": {
|
||||
"visible": false
|
||||
},
|
||||
"animation": {
|
||||
"delay": 0,
|
||||
"effect": 1,
|
||||
"speed": "0",
|
||||
"method": "0",
|
||||
"sequence": "3"
|
||||
}
|
||||
},
|
||||
"plotarea": {
|
||||
"margin": "60px 70px 20px 300px"
|
||||
},
|
||||
"scale-x": {
|
||||
"line-color": "",
|
||||
"values": ["Business Vintage >>", "Business Location suitability >>", "Seasonality >>", "Employee Strength >>", "Business Certifications Sighted >>","Business Premise Ownership >>", "Vehicle Ownership >>", "Business Activity Observed >>", "Supplier Information Shared >>", "Client Information Shared >>","Sufficiency of RM Stock Observed >>", "Sufficiency of Finished / Traded Stock Observed >>", "Main Business Banking Account Vintage >>"],
|
||||
"tick": {
|
||||
"visible": false
|
||||
},
|
||||
"guide": {
|
||||
"visible": false
|
||||
},
|
||||
"item": {
|
||||
"font-size": "10px",
|
||||
"padding-right": "20px",
|
||||
"auto-align": true,
|
||||
"font-color": "#000"
|
||||
}
|
||||
},
|
||||
"scale-y": {
|
||||
"visible": false,
|
||||
"guide": {
|
||||
"visible": false
|
||||
}
|
||||
},
|
||||
"series": [ {
|
||||
"values": [42, 56, 77, 44, 81,42, 56, 77, 44, 81,50,89,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>
|
||||
3
api/application/views/business_scorecard.php
Normal file
3
api/application/views/business_scorecard.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$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" => "Sufficiency of RM Stock Observed >>", "stock_finished_goods_enough" => "Sufficiency of Finished / Traded Stock Observed >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");$descriptions = '';$score = '';if(isset($business) && count($business)){;foreach($business as $key => $d){$descriptions .= '"'.$business_captions [$key].'",'; $score .= ($d['attributed_score'] * 100).',';}}
|
||||
?><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": "Detailed PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "10px","padding-right": "20px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"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>
|
||||
3
api/application/views/general_scorecard.php
Normal file
3
api/application/views/general_scorecard.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, one of the loan applicants? >>","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" => "Name Board of the Business Seen >>","value_of_other_assets" => "Value of Assets as a % of Loan Amount >>");$descriptions = '';$score = '';if(isset($general) && count($general)){;foreach($general as $key => $d){$descriptions .= '"'.$general_captions [$key].'",'; $score .= ($d['attributed_score'] * 100).',';}}
|
||||
?><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": "Detailed PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": [<?php echo $descriptions;?>],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "10px","padding-right": "20px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [<?php echo $score;?>],"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>
|
||||
@ -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 = 52.6;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 = 50.94;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
api/application/views/js/phantomdsc.js
Normal file
1
api/application/views/js/phantomdsc.js
Normal file
@ -0,0 +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": "Detailed PD Score","font-family": "Arial","background-color": "none","font-color": "#A4A4A4","font-size":"14px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["OTP authentication done >>","Is person Met, one of the loan applicants? >>","Qualification of Loan Applicants >>","Comment on Locality >>","Approach to PD location >>","Customer Behaviour >>","Neighbourhood check >>","Name Board of the Business Seen >>","Value of Assets as a % of Loan Amount >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "10px","padding-right": "20px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [27.777777777778,41.666666666667,16.666666666667,19.444444444444,19.444444444444,0,0,27.777777777778,41.666666666667,],"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();};
|
||||
@ -1 +1,2 @@
|
||||
var page = require('webpage').create();page.viewportSize = { width: 650, height: 250 };page.clipRect = { top: 0, left: 0, width: 500, height: 250 };var score = 78;var url = 'https://maps.googleapis.com/maps/api/staticmap?center=CORGO INDIA ENTERPRISES B 19 8 FIRST FLOOR,JOSHI COLONY PATPARGANJ,New Delhi,Delhi,IND&zoom=14&markers=color:red|28.6282898,77.3025616&size=800x300&maptype=roadmap&key=AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg';var image_url ='C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/satellite.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
var page = require('webpage').create();page.viewportSize = { width: 650, height: 250 };page.clipRect = { top: 0, left: 0, width: 500, height: 250 };var score = 78;var url = 'https://maps.googleapis.com/maps/api/staticmap?center=25,+NORTH+STREET,
|
||||
MAMBALAM,Erode,Tamil+Nadu,IND&zoom=14&markers=color:red|12.9202935,80.1685205&size=800x300&maptype=roadmap&key=AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg';var image_url ='C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/satellite.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
@ -365,6 +365,31 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{ echo "<b>Score Chart Not Generated</b>"; }
|
||||
|
||||
|
||||
|
||||
//######################### CHART ###########################
|
||||
|
||||
|
||||
if(isset($dsc_cards['base64_dsc_business']))
|
||||
{
|
||||
echo "<br><br>";
|
||||
|
||||
echo '<p><img src="'.$dsc_cards['base64_dsc_business'].'" style="width:600px;height:350px;"/></p>';
|
||||
|
||||
}
|
||||
else
|
||||
{ echo "<b>Score Chart Not Generated</b>"; }
|
||||
|
||||
if(isset($dsc_cards['base64_dsc_general']))
|
||||
{
|
||||
echo "<br><br>";
|
||||
|
||||
echo '<p><img src="'.$dsc_cards['base64_dsc_general'].'" style="width:600px;height:350px;"/></p>';
|
||||
|
||||
}
|
||||
else
|
||||
{ echo "<b>Score Chart Not Generated</b>"; }
|
||||
|
||||
|
||||
echo "<div class='page_break'></div>";
|
||||
//######################### CHART ###########################
|
||||
}
|
||||
@ -2263,8 +2288,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
<?php
|
||||
|
||||
$i = null;
|
||||
if($i)
|
||||
$show_detailed_scorecard = 1;
|
||||
if($show_detailed_scorecard)
|
||||
{
|
||||
echo "<h3>Details Score Card Section</h3>" ;
|
||||
// *** General Section Questions Score Table
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 20 KiB |
BIN
api/application/views/report_templates/dsc_business.png
Normal file
BIN
api/application/views/report_templates/dsc_business.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
api/application/views/report_templates/dsc_general.png
Normal file
BIN
api/application/views/report_templates/dsc_general.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@ -1,124 +0,0 @@
|
||||
|
||||
<?php
|
||||
//defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$data = $_POST;
|
||||
print_r(($data));
|
||||
|
||||
foreach($data as $k => $d)
|
||||
{
|
||||
print_r($k);
|
||||
echo "###################";
|
||||
print_r($d);
|
||||
echo "@@@@@@@@@@@@@@@@@";
|
||||
}
|
||||
//die();
|
||||
?>
|
||||
<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": "Detailed PD Score",
|
||||
"font-family": "Arial",
|
||||
"background-color": "none",
|
||||
"font-color": "#A4A4A4",
|
||||
"font-size": "14px"
|
||||
},
|
||||
"plot": {
|
||||
"borderRadius": 8,
|
||||
"hover-state": {
|
||||
"visible": false
|
||||
},
|
||||
"animation": {
|
||||
"delay": 0,
|
||||
"effect": 1,
|
||||
"speed": "0",
|
||||
"method": "0",
|
||||
"sequence": "3"
|
||||
}
|
||||
},
|
||||
"plotarea": {
|
||||
"margin": "60px 70px 20px 300px"
|
||||
},
|
||||
"scale-x": {
|
||||
"line-color": "",
|
||||
"values": ["Business Vintage >>", "Business Location suitability >>", "Seasonality >>", "Employee Strength >>", "Business Certifications Sighted >>","Business Premise Ownership >>", "Vehicle Ownership >>", "Business Activity Observed >>", "Supplier Information Shared >>", "Client Information Shared >>","Sufficiency of RM Stock Observed >>", "Sufficiency of Finished / Traded Stock Observed >>", "Main Business Banking Account Vintage >>"],
|
||||
"tick": {
|
||||
"visible": false
|
||||
},
|
||||
"guide": {
|
||||
"visible": false
|
||||
},
|
||||
"item": {
|
||||
"font-size": "10px",
|
||||
"padding-right": "20px",
|
||||
"auto-align": true,
|
||||
"font-color": "#000"
|
||||
}
|
||||
},
|
||||
"scale-y": {
|
||||
"visible": false,
|
||||
"guide": {
|
||||
"visible": false
|
||||
}
|
||||
},
|
||||
"series": [ {
|
||||
"values": [42, 56, 77, 44, 81,42, 56, 77, 44, 81,50,89,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>
|
||||
Loading…
Reference in New Issue
Block a user