sparqapi/api/application/views/report_templates/JSONTOREPORT.php
2019-03-15 16:41:19 +05:30

182 lines
6.5 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<style type="text/css">
.page_break { page-break-before: always; }
@page {
margin: 100px 50px;
font-family:Helvetica,Arial;
}
header {
position: fixed;
top: -70px;
left: 0px;
right: 0px;
height: 20px;
/** Extra personal styles **/
/*background-color: #03a9f4;
color: white;*/
text-align: right;
/*line-height: 35px;*/
}
footer {
position: fixed;
bottom: 5px;
left: 0px;
right: 0px;
height: 30px;
font-size: 10px;
/** Extra personal styles **/
/*background-color: #03a9f4;
color: white;*/
text-align: left;
/*line-height: 35px;*/
}
.table2 {
border: 1px solid black;
width: 100%;
}
.table2 td {
border: 1px solid black;
height: 50px;
text-align: center;
}
.table2 th {
border: 1px solid black;
height: 50px;
text-align: center;
}
.table2 {
border-collapse: collapse;
}
tfoot{
color:#e00201;
}
/* metert gauge css */
.sc-gauge { width:200px; height:200px; margin:200px auto; }
.sc-background { position:relative; height:100px; margin-bottom:10px; background-color:#fff; border-radius:150px 150px 0 0; overflow:hidden; text-align:center; }
.sc-mask { position:absolute; top:20px; right:20px; left:20px; height:80px; background-color:#555888; border-radius:150px 150px 0 0 }
.sc-percentage { position:absolute; top:100px; left:-200%; width:400%; height:400%; margin-left:100px; background-color:#00aeef; }
.sc-percentage { transform:rotate(158deg); transform-origin:top center; }
.sc-min { float:left; }
.sc-max { float:right; }
.sc-value { position:absolute; top:50%; left:0; width:100%; font-size:48px; font-weight:700 }
/* metert gauge css */
</style>
</head>
<body style="font-size:14px;margin:25px 50px">
<footer>
<hr>
Copyright@Sineedge
</footer>
<header>
<div><img style="width:150;height:50px;opacity: 0.5;" src='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' /></div>
<hr>
</header>
<!-- Wrap the content of your PDF inside a main tag -->
<?php $loan_form = json_decode($pd_processed_forms[10][0]['processed_json'],true);
?>
<?php
echo "<br><br><br><br><br><br><br><br><br>";
setlocale(LC_MONETARY, 'en_IN');
echo "<div>";
echo "<h1><center>PERSONAL DISCUSSION REPORT</center></h1> ";
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
echo "<h2><center>".$pd_master_details[0]['title_name'].$pd_master_details[0]['main_applicant']."</center></h2>";
echo "</div>";
echo "<br><br><br><br>";
?>
<table>
<tbody>
<?php
echo "<tr><td>PD Report Date </td> <td> </td> <td>".$pd_master_details[0]['updatedon']."</td>";
echo "<tr><td>PD Vist Date </td> <td> </td> <td> ".$pd_master_details[0]['scheduled_on']."</td></tr>";
echo "<tr><td>PD Initiated by </td> <td> </td> <td>".$pd_master_details[0]['branch_name']." Branch</td></tr>";
echo "<tr><td>Loan Applicant ID </td> <td> </td> <td> ".$pd_master_details[0]['lender_applicant_id']."</td></tr>";
echo "<tr><td>Product </td> <td> </td> <td>".$pd_master_details[0]['product_name']."</td></tr>";
echo "<tr><td>Customer Segment </td> <td> </td> <td>".$pd_master_details[0]['customer_segment_name']."<td></tr>";
?>
</tbody>
</table>
<?php
echo "<p>Loan Amount Applied For : </p>";
echo "<table style='border-collapse:collapse;text-align:right;padding:30px;'>
<tr> <td>As Per PD Initiation </td> <td> </td><td> </td><td> </td><td>Rs " . number_format($pd_master_details[0]['loan_amount'],2,',',','). ".</td> </tr>
<tr> <td>As Per Loan Applicants during PD</td> <td> </td><td> </td><td> </td> <td>Rs " . number_format($loan_form['loan_amount'],2,',',','). ".</td> </tr>
</table>
";
echo "<div class='page_break'></div>";
echo "<br><br>";
echo "<h2>Executive Summary</h2>";
// echo "General Section Score :".number_format($pd_score['score_summary']['general']['actual_score'],2,'.','.')."<br>";
// echo "Business Section Score :".number_format($pd_score['score_summary']['business']['actual_score'],2,'.','.')."<br>";
// echo "Final Remarks Score :".number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.','.')."<br>";
// echo "Final PD Score :".number_format($pd_score['score_summary']['overall_score']['final_score'],2,'.','.')."<br>";
?>
<table>
<tr> <td>General Section Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['general']['actual_score'],2,'.','.')?></td></tr>
<tr> <td>Business Section Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['business']['actual_score'],2,'.','.')?></td></tr>
<tr> <td>Final Remarks Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['final_remarks']['actual_score'],2,'.','.')?></td></tr>
<tr> <td>Final PD Score</td> <td> </td> <td><?php echo number_format($pd_score['score_summary']['overall_score']['final_score'],2,'.','.')?></td></tr>
</table>
<?php
if($base64_pdscore_chart_url != "" || $base64_pdscore_chart_url != null)
{
echo "<br><br>";
//####################### CHART #############################
echo '<p><img src="'.$base64_pdscore_chart_url.'" style="float:center;width:600px;height:350px;"/></p>';
//######################### CHART ###########################
//####################General Section Statred########################
}
else
{ echo "<b>Score Chart Not Generated</b>"; }
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
$persons_met = "Default";
$all_company_details = null;
if(array_key_exists('companies',$general_form))
{
$all_company_details = $general_form['companies'];
}
// echo MYUITIL::findCompanyName($all_company_details,2);
//print_r($all_company_details);
//print_r($pd_score['overall_score']['final_score']);
?>
</body>
</html>
<!-- ####################End Of General Section Statred########################-->