1039 lines
35 KiB
PHP
1039 lines
35 KiB
PHP
<?php
|
||
defined('BASEPATH') or exit('No direct script access allowed');
|
||
?>
|
||
|
||
<!DOCTYPE html>
|
||
<html lang="en" id="mydoc" onkeyup="saveEdits(event)">
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title></title>
|
||
<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||
<style type="text/css">
|
||
.page_break {
|
||
page-break-before: always;
|
||
}
|
||
|
||
#page_break {
|
||
page-break-before: always;
|
||
}
|
||
|
||
/*.page { width: 100%; height: 95%; }*/
|
||
@page {
|
||
margin: 100px 50px;
|
||
/*font-family:Helvetica,Arial;*/
|
||
font-family: Merriweather;
|
||
}
|
||
|
||
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: 20px;
|
||
font-size: 10px;
|
||
|
||
/** Extra personal styles **/
|
||
/*background-color: #03a9f4;
|
||
color: white;*/
|
||
text-align: left;
|
||
/*line-height: 35px;*/
|
||
}
|
||
|
||
|
||
.non-editable {
|
||
background-color: #99ff99;
|
||
}
|
||
|
||
tfoot {
|
||
color: #e00201;
|
||
}
|
||
|
||
.simpletable,
|
||
.simpletable th,
|
||
.simpletable td {
|
||
border: 1px solid black;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
/* ######### Mini Score Card Table Styles######### */
|
||
|
||
.mini_scorecard_table {
|
||
width: 100%;
|
||
page-break-inside: avoid;
|
||
}
|
||
|
||
.mini_scorecard_table td,
|
||
.mini_scorecard_table th {
|
||
|
||
page-break-inside: avoid;
|
||
}
|
||
|
||
.mini_scorecard_table th {
|
||
padding-top: 5px;
|
||
padding-bottom: 5px;
|
||
text-align: center;
|
||
background-color: #0191ed;
|
||
color: white;
|
||
page-break-inside: avoid;
|
||
|
||
}
|
||
|
||
/* #########End of Mini Score Card Table Styles######### */
|
||
|
||
|
||
/* #########End of Mini Score Card Div Styles######### */
|
||
#rcorners_green {
|
||
|
||
background: #33cc33;
|
||
padding: 3px;
|
||
width: 75px;
|
||
height: 5px;
|
||
}
|
||
|
||
#rcorners_red {
|
||
|
||
background: red;
|
||
padding: 3px;
|
||
width: 75px;
|
||
height: 5px;
|
||
}
|
||
|
||
#rcorners_light_green {
|
||
|
||
background: #99ff66;
|
||
padding: 3px;
|
||
width: 75px;
|
||
height: 5px;
|
||
}
|
||
|
||
#rcorners_amber {
|
||
|
||
background: #ff9900;
|
||
padding: 3px;
|
||
width: 75px;
|
||
height: 5px;
|
||
}
|
||
|
||
/* #########End of Mini Score Card DIv Styles######### */
|
||
|
||
|
||
|
||
|
||
/* #########Score Card Table Styles######### */
|
||
|
||
.scorecard_table {
|
||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||
/*font-family: Merriweather;*/
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
page-break-inside: avoid;
|
||
}
|
||
|
||
.scorecard_table td,
|
||
.scorecard_table th {
|
||
border: 1px solid #000;
|
||
padding: 8px;
|
||
page-break-inside: avoid;
|
||
|
||
|
||
}
|
||
|
||
.scorecard_table tr:nth-child(even) {
|
||
background-color: #f2f2f2;
|
||
page-break-inside: avoid;
|
||
}
|
||
|
||
.scorecard_table tr:hover {
|
||
background-color: #ddd;
|
||
}
|
||
|
||
.scorecard_table th {
|
||
padding-top: 8px;
|
||
padding-bottom: 8px;
|
||
text-align: center;
|
||
background-color: #0191ed;
|
||
color: white;
|
||
page-break-inside: avoid;
|
||
|
||
}
|
||
|
||
/* #########End of Score Card Table Styles######### */
|
||
|
||
/* #########Score Card for personal assest section table getting overlapped ######### */
|
||
|
||
.scorecard_table_resonal_assest {
|
||
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
|
||
/*font-family: Merriweather;*/
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
|
||
}
|
||
|
||
.scorecard_table_resonal_assest td,
|
||
.scorecard_table_resonal_assest th {
|
||
border: 1px solid #000;
|
||
padding: 8px;
|
||
|
||
|
||
|
||
}
|
||
|
||
.scorecard_table_resonal_assest tr:nth-child(even) {
|
||
background-color: #f2f2f2;
|
||
}
|
||
|
||
.scorecard_table_resonal_assest tr:hover {
|
||
background-color: #ddd;
|
||
}
|
||
|
||
.scorecard_table_resonal_assest th {
|
||
padding-top: 8px;
|
||
padding-bottom: 8px;
|
||
text-align: center;
|
||
background-color: #0191ed;
|
||
color: white;
|
||
|
||
}
|
||
|
||
/* #########End of Score Card Table Styles######### */
|
||
|
||
#boxstyle2 {
|
||
box-sizing: border-box;
|
||
width: 200px;
|
||
height: 20px;
|
||
padding: 5px;
|
||
border: 2px outset black;
|
||
text-align: center;
|
||
}
|
||
|
||
#boxstyle3 {
|
||
box-sizing: border-box;
|
||
width: 120px;
|
||
height: 20px;
|
||
padding: 5px;
|
||
border: 2px outset black;
|
||
}
|
||
|
||
#first_div {
|
||
width: 150px;
|
||
height: 25px;
|
||
border: 2px outset #000;
|
||
overflow: hidden;
|
||
text-align: center;
|
||
border-color: red;
|
||
color: red;
|
||
/*padding-left: 20px;*/
|
||
|
||
}
|
||
|
||
#tick_div {
|
||
position: relative;
|
||
width: 40px;
|
||
height: 25px;
|
||
margin-left: 100%;
|
||
margin-top: -29px;
|
||
border: 2px outset #000;
|
||
text-align: center;
|
||
border-color: red;
|
||
color: red;
|
||
}
|
||
|
||
#tick_div_other {
|
||
position: relative;
|
||
width: 40px;
|
||
height: 25px;
|
||
margin-left: 93%;
|
||
margin-top: -29px;
|
||
border: 2px outset #000;
|
||
text-align: center;
|
||
border-color: red;
|
||
color: red;
|
||
}
|
||
|
||
|
||
/* #########Person met card css######### */
|
||
.chip {
|
||
|
||
padding: 0 25px;
|
||
height: 100px;
|
||
width: 600px;
|
||
font-size: 14px;
|
||
|
||
border-radius: 50px;
|
||
background-color: #f1f1f1;
|
||
}
|
||
|
||
.chip #img1 {
|
||
float: left;
|
||
margin: 0 10px 0 -25px;
|
||
height: 100px;
|
||
width: 100px;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.chip #img2 {
|
||
float: right;
|
||
margin: 0 -25px 0px -125px;
|
||
height: 100px;
|
||
width: 100px;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
|
||
|
||
|
||
/* #########Person met card css######### */
|
||
|
||
|
||
/* #########Doc sighted gallary css######### ;*/
|
||
|
||
.gallery {
|
||
margin: 5px;
|
||
border: 1px solid #ccc;
|
||
width: 100%;
|
||
|
||
}
|
||
|
||
.gallery:hover {
|
||
border: 1px solid #777;
|
||
}
|
||
|
||
|
||
|
||
.desc {
|
||
padding: 8px;
|
||
text-align: center;
|
||
color: green
|
||
}
|
||
|
||
/* #########Doc sighted gallary css######### */
|
||
|
||
/* ######### TOOLTIP CSS START ######### */
|
||
|
||
.tooltip {
|
||
position: relative;
|
||
display: inline;
|
||
border-bottom: 1px dotted black;
|
||
}
|
||
|
||
.tooltip .tooltiptext {
|
||
visibility: hidden;
|
||
width: 120px;
|
||
background-color: black;
|
||
color: #fff;
|
||
text-align: center;
|
||
border-radius: 6px;
|
||
padding: 5px 0;
|
||
|
||
/* Position the tooltip */
|
||
position: absolute;
|
||
z-index: 1;
|
||
}
|
||
|
||
.tooltip:hover .tooltiptext {
|
||
visibility: visible;
|
||
}
|
||
|
||
#ini_table {
|
||
table-layout: fixed;
|
||
width: 80%;
|
||
|
||
|
||
}
|
||
|
||
#ini_table td {
|
||
word-wrap: break-word;
|
||
width: 50%;
|
||
}
|
||
|
||
.intelligence {
|
||
/*background-color: lightgrey;*/
|
||
width: auto;
|
||
border: 5px solid #0191ed;
|
||
padding: 5px;
|
||
/*margin: 10px;*/
|
||
}
|
||
|
||
/* ######### TOOLTIP CSS END ######### */
|
||
</style>
|
||
<script type="text/javascript">
|
||
function saveEdits(e) {
|
||
|
||
var editElem = document.getElementById("mydoc");
|
||
var userVersion = editElem.innerHTML;
|
||
//localStorage.removeItem('userEdits')
|
||
//save the content to local storage
|
||
localStorage.userEdits = userVersion;
|
||
}
|
||
</script>
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
|
||
|
||
<footer>
|
||
<hr>
|
||
Powered by PD Genie™
|
||
</footer>
|
||
|
||
<header>
|
||
<div><img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png' /></div>
|
||
<hr>
|
||
</header>
|
||
|
||
<!-- Wrap the content of your PDF inside a main tag -->
|
||
<?php
|
||
$main_applicant_name = $pd_master_details[0]['title_name'] . ' ' . $pd_master_details[0]['main_applicant'];
|
||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||
?>
|
||
<?php
|
||
echo "<br><br>";
|
||
echo "<div>";
|
||
echo "<h1><center>VISIT REPORT</center></h1> ";
|
||
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
|
||
echo "<h2><center>" . $main_applicant_name . "</center></h2>";
|
||
echo "</div>";
|
||
echo "<br><br><br><br>";
|
||
?>
|
||
|
||
<table align="center" id="ini_table" border="0">
|
||
<tbody>
|
||
<?php
|
||
echo '<tr><td>Visit Initiated Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['createdon'] . '</td></tr>';
|
||
echo '<tr><td>Visit Date </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['pd_visit_date'] . '</td></tr>';
|
||
echo '<tr><td>Visit Report Date </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['pd_report_generated_date'] . '</td></tr>';
|
||
echo '<tr><td>Visit Initiated by </td> <td style="width:2%;">:</td> <td>' . $pd_master_details[0]['branch_name'] . ' Branch</td></tr>';
|
||
echo '<tr><td>Loan Application ID </td> <td style="width:2%;">:</td> <td> ' . $pd_master_details[0]['lender_applicant_id'] . '</td></tr>';
|
||
echo '<tr><td>Product </td> <td style="width:2%;">:</td> <td> Home Loan </td></tr>';
|
||
echo '<tr><td>Customer Segment </td> <td style="width:2%;">:</td> <td> Self Employed </td></tr>';
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
|
||
<?php
|
||
echo "<br><br>";
|
||
echo "<br><br>";
|
||
echo "<br><br>";
|
||
echo "<br><br>";
|
||
echo "<br><br>";
|
||
echo "<p></p>";
|
||
|
||
$header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1);
|
||
if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) {
|
||
echo '<p align="justify"><i><strong>Disclaimer: </strong>' . $header_lender_disclaimer['disclaimer'] . '</i></p>';
|
||
}
|
||
|
||
echo '<p align="justify"><i><strong>Registered / Corporate Office:</strong> SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002</i></p>';
|
||
?>
|
||
|
||
|
||
|
||
<!-- ####################### general information ############################-->
|
||
<?php
|
||
echo '<br>';
|
||
echo '<h3 contenteditable="true">General Information: </h3>';
|
||
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
|
||
$value = $general_form['json'];
|
||
$all_applicant_details = $applicants_details;
|
||
if ($value['is_person_met'] == 'yes') {
|
||
echo '<p>' . 'Applicant <b>('.$value['Name_of_the_Person_met'].')</b> was met at the visited address.' . '</p>';
|
||
}else if ($value['is_person_met'] == 'no') {
|
||
echo '<p>' . '('.$value['Name_of_the_Person_met'].') ('.$value['designation_person_met_master'].') was met at the visited address during visit..' . '</p>';
|
||
}
|
||
if (isset($general_form['general_remark']) && $general_form['general_remark'] != "") {
|
||
echo '<p>' . $general_form['general_remark'] . '</p>';
|
||
}
|
||
?>
|
||
<!-- ####################### general information ends ############################-->
|
||
|
||
<!-- ####################### address details ############################-->
|
||
<?php
|
||
echo '<br>';
|
||
$address_form = json_decode($pd_processed_forms[28][0]['processed_json'], true);
|
||
$address_value = $address_form['json'];
|
||
if(!empty($address_value)){
|
||
echo '<h3 contenteditable="true">Address Details: </h3>';
|
||
if ($address_value['is_pd_done_on_initiated_address'] == 'yes') {
|
||
echo '<p>' . '
|
||
<b>Visit Initiated Address:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'. </p>';
|
||
}
|
||
if ($address_value['is_pd_done_on_initiated_address'] == 'no') {
|
||
echo '<p>' . '
|
||
<b>Address Where Visit is Initiated:</b> '.$address_value['initiated_address'].' , '.$address_value['city_master'].' , '.$address_value['state_master'].' , '.$address_value['pincode_master'].'.
|
||
<b>Address Where Visit was actually done:</b> '.$address_value['actual_pd_address'].' , '.$address_value['city2_master'].' , '.$address_value['state2_master'].' , '.$address_value['pincode2_master'].'.
|
||
<b>Reason for change in Visit address:</b> '.$address_value['end_use'].'.</p>';
|
||
}
|
||
echo '<p>' . 'The Field Visit was done at <b>'.$address_value['address_type_master'].'</b> of the loan applicants. The <b>'.$address_value['address_type_master'].'</b> is located in a <b>'.$address_value['locality_master'].'</b> and the estimated area of the <b>'.$address_value['address_type_master'].'</b> is <b>'.$address_value['uom_master'].'</b>. The location was <b>'.$address_value['Approach_to_PD_location'].'</b>. As Per Officer, the <b>'.$address_value['address_type_master'].'</b> is situated in a <b>'.$address_value['comment_locality_master'].'</b> Locality. ' . '</p>';
|
||
}
|
||
?>
|
||
<div id="page_break"></div>
|
||
<!-- ####################### address details ends ############################-->
|
||
|
||
<!-- ####################### office visit DI ############################-->
|
||
<?php
|
||
echo '<br>';
|
||
echo '<h3 contenteditable="true">VISIT DETAILS: </h3>';
|
||
|
||
|
||
$residence_visit_data = json_decode($pd_processed_forms[30][0]['processed_json'], true);
|
||
$rv_value = $residence_visit_data['json'];
|
||
|
||
$year = $rv_value['year'].(abs($rv_value['year'])>=2) ? ' Years' : ' Year';
|
||
$month = '';
|
||
if($rv_value['month'] > 0 && (!empty($rv_value['month'])) && isset($rv_value['month'])){
|
||
$month = $rv_value['month'].(abs($rv_value['month'])>=2) ? ' Months' : ' Month';
|
||
$month = ' and '.$month;
|
||
}
|
||
$type_of_proof = preg_replace("/_/i", ' ', $rv_value['type_of_proof'] );
|
||
$type_of_proof = ucwords($type_of_proof);
|
||
|
||
echo '<ul><li style="margin: 15px 0;">The Applicant is residing at the visited address for '.$year.$month.'.</li>
|
||
<li style="margin: 15px 0;">The Residence is <b>'.ucwords($rv_value['Visited_address_is_rented']).'</b> by the applicant.</li>';
|
||
|
||
if($ov_value['address_proof_shared'] == 'Yes'){
|
||
echo '<li style="margin: 15px 0;"> Address Proof: <b>'.$type_of_proof.'</b> was shared during visit.</li>';
|
||
}
|
||
if($ov_value['address_proof_shared'] == 'No'){
|
||
echo '<li style="margin: 15px 0;"> Address Proof <b> was not shared </b> during visit.</li>';
|
||
}
|
||
// if($ov_value['Visited_address_is_rented'] != 'not disclosed '){
|
||
// echo '<li style="margin: 15px 0;">The <b>'.$ov_value['visited_address_is'].'</b> is <b>'.$ov_value['Visited_address_is_rented'].'</b>.</li>';
|
||
// }
|
||
echo '</ul>';
|
||
?>
|
||
<div id="page_break"></div>
|
||
<!-- ####################### office visit DI ends ############################-->
|
||
|
||
<!-- ################# neighbourhood/reference check #################-->
|
||
<?php
|
||
|
||
$pd_offiecer_status_about_neighbor = "";
|
||
$neighbour_details = json_decode($pd_processed_forms[32][0]['processed_json'], true);
|
||
$neighbour_value = $neighbour_details['json'];
|
||
$neighbourhood_form_common_remarks = $neighbour_value['neighbour_reference_remark'];
|
||
if(strcasecmp($neighbour_value['neighbourhood_status'],'could not verify')){
|
||
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
|
||
if(isset($neighbour_value['neighbourhood_list']) && count($neighbour_value['neighbourhood_list'])>0){
|
||
$company_name = MYUTIL::findCompanyName($all_company_details,1,1);
|
||
}
|
||
}
|
||
?>
|
||
<h3 contenteditable="true">Neighbourhood / Reference Check</h3>
|
||
<?php
|
||
|
||
//echo $pd_offiecer_status_about_neighbor;
|
||
if(count($neighbour_value)>0){
|
||
|
||
$neighbourhood_name='Neighbour Check was done with ';
|
||
$neighbourhood_name.= $neighbour_value['neighbourhood_name'].'.';
|
||
$neighbourhood_do_know = null;
|
||
$neighbourhood_business_running_yr = null;
|
||
$ownership = null;
|
||
$neighbourhood_name_only = $neighbour_value['neighbourhood_name'];
|
||
if(strtoupper($neighbour_value['do_know'])=='YES'){
|
||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." knows about applicants and their business.";
|
||
} else if(strtoupper($neighbour_value['do_know'])=='NO'){
|
||
$neighbourhood_do_know = $neighbour_value['neighbourhood_name']." did not know about the applicant or their business.";
|
||
}
|
||
if($neighbour_value['how_long_do_know_in_year'] || $neighbour_value['how_long_do_know_in_month'])
|
||
{
|
||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." confirmed that the business has been in operation for ";
|
||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_year'] == 1) ? $neighbour_value['how_long_do_know_in_year']." year" : (($neighbour_value['how_long_do_know_in_year'] > 1) ? $neighbour_value['how_long_do_know_in_year']." years" : "");
|
||
$neighbour_value['how_long_do_know_in_year'] && $neighbour_value['how_long_do_know_in_month'] ? $neighbourhood_business_running_yr .= ' and ':'';
|
||
$neighbourhood_business_running_yr .= ($neighbour_value['how_long_do_know_in_month'] == 1) ? $neighbour_value['how_long_do_know_in_month']." month" : (($neighbour_value['how_long_do_know_in_month'] > 1) ? $neighbour_value['how_long_do_know_in_month']." months" : "");
|
||
$neighbourhood_business_running_yr .= '.';
|
||
}
|
||
else
|
||
{
|
||
$neighbourhood_business_running_yr = $neighbour_value['neighbourhood_name']." was not aware of how long the business is in operation.";
|
||
}
|
||
$ownwers_list = '';
|
||
if($neighbour_value['organisation_owner']){
|
||
// echo "type" . gettype($neighbour_value['organisation_owner']);
|
||
for($i = 0; $i < count($neighbour_value['organisation_owner']); $i++)
|
||
{
|
||
$owner = $neighbour_value['organisation_owner'][$i];
|
||
if($owner != 0)
|
||
{
|
||
$title = MYUTIL::applicantTitleName($applicants_details,$owner);
|
||
$ownwers_list .= $title.' '.APPLICANTNAME_GRABBER::getApplicantsNameById($owner,$applicants_details).' , ';
|
||
}
|
||
else
|
||
{
|
||
$ownwers_list .= ' '.$neighbour_value['other_organisation_owner'].' , ';
|
||
}
|
||
}
|
||
//echo $ownwers_list;
|
||
//$ownwers_list = substr_replace($ownwers_list,'', strrpos(-$ownwers_list,','),1);
|
||
//echo $ownwers_list;
|
||
//echo $ownwers_list;echo "**********";
|
||
|
||
$ownwers_list = substr_replace($ownwers_list,'', strrpos($ownwers_list,','),1);
|
||
if(strrpos($ownwers_list,','))
|
||
{
|
||
$ownwers_list = substr_replace($ownwers_list,' and ', strrpos($ownwers_list,','),1);
|
||
}
|
||
|
||
|
||
$grammer1 = count($neighbour_value['organisation_owner']) > 1 ? ' are ': ' is ';
|
||
$grammer2 = count($neighbour_value['organisation_owner']) > 1 ? 'owners': 'owner';
|
||
$ownership = 'As per '.$neighbour_value['neighbourhood_name'].' the '.$grammer2 .' of '.$company_name.$grammer1.$ownwers_list.'.';
|
||
|
||
}else
|
||
{
|
||
$ownership = $neighbour_value['neighbourhood_name']." was not aware of the business ownership.";
|
||
}
|
||
$existNeighRefCheck = 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);
|
||
?>
|
||
|
||
<?php
|
||
if(!empty($existNeighRefCheck)){
|
||
$nfValue = $existNeighRefCheck;
|
||
echo $nfValue['neighbourhood_name_only'];
|
||
?>
|
||
|
||
<ul>
|
||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
|
||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
|
||
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
|
||
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?></li>
|
||
</ul>
|
||
<?php }?>
|
||
|
||
<li style="margin: 15px 0;"> Neighbourhood Check Status is <span style="font-size:16px;font-weight:bold;"><?php echo $pd_offiecer_status_about_neighbor;?>.</span></li>
|
||
</li>
|
||
|
||
|
||
|
||
<?php
|
||
}
|
||
else{?>
|
||
<!-- <p>Status of check: Could Not Verify. <br>Neighbour Check was not possible due to Could not verify</p> -->
|
||
<!-- <p>Neighbour Check was not possible due to Could not verify</p> -->
|
||
<p>Status of the check: could not verify.</p>
|
||
|
||
<?php
|
||
}
|
||
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
|
||
?>
|
||
|
||
<!-- ################# neighbourhood/reference check ends #################-->
|
||
|
||
<!-- ################# credit manager specific query #################-->
|
||
<?php
|
||
|
||
$credit_officier_specific_queries = array();
|
||
if (isset($pd_processed_forms[31])) {
|
||
$credit_officier_specific_queries = json_decode($pd_processed_forms[31][0]['processed_json'], true);
|
||
// print_r($credit_officier_specific_queries);
|
||
}
|
||
|
||
echo '<br>';
|
||
echo '<h3 contenteditable="true">Credit Manager`s Specific Queries:</h3>';
|
||
|
||
if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) {
|
||
|
||
|
||
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) {
|
||
echo 'Question - ' . $value['question'] . '<br>';
|
||
echo 'Answer - ' . $value['answer'];
|
||
echo '<br><br>';
|
||
}
|
||
} else {
|
||
echo 'There are no specific queries raised by Credit Manager.';
|
||
}
|
||
|
||
echo '<br>';
|
||
echo '<h3 contenteditable="true">Document to be photographed/scanned: </h3>';
|
||
|
||
if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) {
|
||
|
||
|
||
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) {
|
||
echo 'Document Required : ' . $doc_value['doc_name'] . '<br>';
|
||
echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '<br>' : 'NO<br>');
|
||
if ($doc_value['ans'] != 'yes') {
|
||
echo 'Reason : ' . $doc_value['reason'];
|
||
}
|
||
echo '<br><br>';
|
||
}
|
||
} else {
|
||
echo 'There are no specific documents to be collect.';
|
||
}
|
||
|
||
if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) {
|
||
echo '<br>';
|
||
echo '<h3 contenteditable="true">Queries related to Covid-19: </h3>';
|
||
|
||
foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) {
|
||
if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) {
|
||
echo 'Question : ' . $covid_value['question'] . '<br>';
|
||
$temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||
if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) {
|
||
$temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')';
|
||
}
|
||
echo 'Answer : ' . $temp_answer . '<br>';
|
||
$sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']];
|
||
if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) {
|
||
echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '<br>';
|
||
}
|
||
|
||
echo '<br>';
|
||
}
|
||
}
|
||
}
|
||
|
||
?>
|
||
<!-- ################# credit manager specific query ends#################-->
|
||
|
||
<!-- ################# final remarks #################-->
|
||
<div class="page_break"></div>
|
||
<br>
|
||
<h3 contenteditable="true">VISITING OFFICER`S REMARKS</h3>
|
||
<?php
|
||
$final_remark_data = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
|
||
//print_r($final_remark_data);
|
||
$polite = null;
|
||
$rude = null;
|
||
$other_behaviour = null;
|
||
$other_behaviour_remarks = null;
|
||
$fair = null;
|
||
$well = null;
|
||
$not = null;
|
||
|
||
$positive = null;
|
||
$negative = null;
|
||
$refer_to_credit = null;
|
||
$fo_diplay = null;
|
||
$other_pd_officer_command = null;
|
||
$other_command_remark = null;
|
||
|
||
$other_pd_officer_recommandation = null;
|
||
$other_pd_officer_recommandation_remark = null;
|
||
if ($final_remark_data['final_custormer_remark_type'] == 3) {
|
||
$polite = 1;
|
||
} else if ($final_remark_data['final_custormer_remark_type'] == 2) {
|
||
$rude = 1;
|
||
} else if ($final_remark_data['final_custormer_remark_type'] == 1) {
|
||
$other_behaviour = 1;
|
||
$other_behaviour_remarks = $final_remark_data['final_other_customer_behaviour'];
|
||
}
|
||
|
||
if (!strcasecmp($final_remark_data['is_service_provided'], 'fairly_suited')) {
|
||
$fair = 1;
|
||
} else if (!strcasecmp($final_remark_data['is_service_provided'], 'well_suited')) {
|
||
$well = 1;
|
||
} else if (!strcasecmp($final_remark_data['is_service_provided'], 'not_suited')) {
|
||
$not = 1;
|
||
}
|
||
|
||
|
||
if ($final_remark_data['pd_officers_recommendation'] == 2) {
|
||
$positive = 1;
|
||
$fo_diplay = "Positive";
|
||
} else if ($final_remark_data['pd_officers_recommendation'] == 3) {
|
||
$negative = 1;
|
||
$fo_diplay = "Negative";
|
||
} else if ($final_remark_data['pd_officers_recommendation'] == 4) {
|
||
$refer_to_credit = 1;
|
||
$fo_diplay = "Refer to credit";
|
||
} else if ($final_remark_data['pd_officers_recommendation'] == 1) {
|
||
$other_pd_officer_command = 1;
|
||
$other_command_remark = $final_remark_data['others_pd_officers_recommendation'];
|
||
}
|
||
$pd_officer_final_remark = isset($final_remark_data['final_form_remarks']) ? $final_remark_data['final_form_remarks'] : '';
|
||
|
||
//if(is_null($other_behaviour)){ echo 'null'; }
|
||
//if(is_null($other_behaviour)){ echo 'null'; }
|
||
//if(is_null($other_behaviour)){ echo 'null'; }
|
||
|
||
?>
|
||
<div>
|
||
|
||
<?php
|
||
if (isset($final_remark_data['market_intelligence']) && $final_remark_data['market_intelligence'] != '') {
|
||
echo '<div class="intelligence">';
|
||
echo '<h3>Personal feedback or market intelligence on the case (if any):</h3>';
|
||
echo '<p>' . $final_remark_data['market_intelligence'] . '</p>';
|
||
echo '</div>';
|
||
//echo '<br>';
|
||
}
|
||
?>
|
||
<ul>
|
||
<li>Customer Behaviour: </li>
|
||
|
||
<br><br>
|
||
<!-- <table cellspacing="25">
|
||
<tr>
|
||
<td><div id="boxstyle2">polite <div class="ver_line"><?php if ($polite) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></div></td>
|
||
|
||
<td><div id="boxstyle2">Rude <?php if ($rude) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
|
||
<td><div id="boxstyle2">Others as mentioned below <?php if ($other_behaviour) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
</tr>
|
||
</table> -->
|
||
<?php $tick_mark = '<span style="font-family: DejaVu Sans; sans-serif;font-size:12px">✔</span>';
|
||
?>
|
||
<table>
|
||
<tr>
|
||
<td>
|
||
<div id="first_div" style="border-color:green;color:black;">Polite</div>
|
||
<div id="tick_div" style="border-color:green;color:black;"><?php if ($polite) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:red;color:black;">Rude</div>
|
||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($rude) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<?php if (!is_null($other_behaviour)) { ?>
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:red;color:black;">Others*</div>
|
||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($other_behaviour) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<?php } ?>
|
||
</tr>
|
||
</table>
|
||
<br>
|
||
<?php if ($other_behaviour) {
|
||
|
||
echo "*" . $other_behaviour_remarks;
|
||
echo '<br><br>';
|
||
} ?>
|
||
|
||
|
||
<!-- <li>Suitability of Business Location: </li>
|
||
<br><br>
|
||
|
||
<table>
|
||
|
||
<tr>
|
||
<td >
|
||
<div id="first_div" style="border-color:green;color:black;">Well Suited</div> <div id="tick_div" style="border-color:green;color:black;"><?php if ($well) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:#ffff00;color:black;">Fairly Suited</div> <div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($fair) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:red;color:black;">Not Suited</div> <div id="tick_div" style="border-color:red;color:black;"><?php if ($not) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
</table> -->
|
||
<br>
|
||
<li>PD Officer’s overall assessment: </li>
|
||
<br><br>
|
||
|
||
<table>
|
||
<!-- <tr>
|
||
<td><div id="boxstyle3">Positive <?php if ($positive) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
|
||
<td><div id="boxstyle3">Refer to Credit <?php if ($refer_to_credit) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
|
||
<td><div id="boxstyle3">Negative <?php if ($negative) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
</tr>
|
||
|
||
<?php if ($other_pd_officer_command) { ?>
|
||
<td><div id="boxstyle3">Others <?php if ($other_pd_officer_command) { ?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
|
||
<?php } ?>
|
||
</tr> -->
|
||
<tr>
|
||
<?php if ($other_pd_officer_command == null) { ?>
|
||
<td>
|
||
<div id="first_div" style="border-color:green;color:black;">Positive</div>
|
||
<div id="tick_div" style="border-color:green;color:black;"><?php if ($positive) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:#ffff00;color:black;">Refer to Credit</div>
|
||
<div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($refer_to_credit) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
|
||
<td style="padding-left:50px;">
|
||
<div id="first_div" style="border-color:red;color:black;">Negative</div>
|
||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($negative) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<?php } ?>
|
||
<?php if ($other_pd_officer_command) { ?>
|
||
<td>
|
||
<div id="first_div" style="border-color:red;color:black;">Others*</div>
|
||
<div id="tick_div" style="border-color:red;color:black;"><?php if ($other_pd_officer_command) {
|
||
echo $tick_mark;
|
||
} ?></div>
|
||
</td>
|
||
<?php } ?>
|
||
</tr>
|
||
|
||
|
||
</table>
|
||
<br>
|
||
<?php if (!$other_pd_officer_command) { ?>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<p style="text-align:justify;">PD officer recommendation is <?php
|
||
|
||
if ($positive) {
|
||
$color_for_pd_offcier_recom = 'green';
|
||
} else if ($negative) {
|
||
$color_for_pd_offcier_recom = 'red';
|
||
} else {
|
||
$color_for_pd_offcier_recom = 'black';
|
||
}
|
||
echo '<strong><span style="font-size:20px;color:' . $color_for_pd_offcier_recom . ';">' . $fo_diplay . '</span>.</strong></p>'; ?>
|
||
<p style="text-align:justify;">The following key points were considered while arriving at the aforementioned status.</p>
|
||
<?php
|
||
|
||
if ($positive) {
|
||
echo "<ul>";
|
||
foreach ($final_remark_data['recommendation_positive'] as $pos) {
|
||
echo "<li>" . $pos['reason_for_positive'] . "</li>";
|
||
}
|
||
} else if ($negative) {
|
||
echo "<ul>";
|
||
foreach ($final_remark_data['recommendation_negative'] as $neg) {
|
||
echo "<li>" . $neg['reason_for_negative'] . "</li>";
|
||
}
|
||
} else if ($refer_to_credit) {
|
||
echo "<ul>";
|
||
foreach ($final_remark_data['recommendation_refer_to_credit'] as $rtc) {
|
||
echo "<li>" . $rtc['reason_for_refer_to_credit'] . "</li>";
|
||
}
|
||
}
|
||
echo "</ul>";
|
||
?>
|
||
<?php } else {
|
||
echo "<p>" . $other_command_remark . "</p>";
|
||
}
|
||
|
||
echo '<p style="text-align:justify;">' . $pd_officer_final_remark . '</p>'
|
||
?>
|
||
<!-- ################# final remarks ends #################-->
|
||
<!-- ################# satellite #################-->
|
||
<?php
|
||
if (!empty($distances['distance'])) {
|
||
echo '<br><br><b> Distance to PD location : </b>' . $distances['distance'];
|
||
}
|
||
echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>' . $pd_master_details[0]['start_location'];
|
||
echo '<br><br>';
|
||
?>
|
||
<?php
|
||
$satellite_url = '';
|
||
|
||
if (isset($pd_images['common_images']) && count($pd_images['common_images'])) {
|
||
foreach ($pd_images['common_images'] as $com_key => $com_value) {
|
||
if ($com_value['pd_document_title'] == 'satellite') {
|
||
$satellite_url = $com_value['doc_url'];
|
||
unset($pd_images['common_images'][$com_key]);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
?>
|
||
|
||
|
||
<img border="3" src="<?php echo $satellite_url; ?>" alt=" Satellite Image of location of Where PD was Done" style="width:100%;height:300px;border-color:#0191ed" /><br><br><br>
|
||
<!-- ################# satellite ends #################-->
|
||
<!-- ################# common images #################-->
|
||
|
||
<?php
|
||
if (count($pd_images['common_images'])) {
|
||
//echo count($pd_images['common_images']);
|
||
//print_r($pd_images['common_images']);
|
||
// foreach ($pd_images['common_images'] as $key => $value)
|
||
// {
|
||
// if($value['img_type'] == 1 || $value['img_type'] == 2 || $value['pd_document_title'] == 'satellite')
|
||
// {
|
||
// unset($pd_images['common_images'][$key]);
|
||
// }
|
||
// }
|
||
//echo count($pd_images['common_images']);
|
||
// print_r($pd_images['common_images']);
|
||
$pd_images['common_images'] = array_values($pd_images['common_images']);
|
||
$tot_rows = ceil(count($pd_images['common_images']) / 3);
|
||
echo '<div id="page_break"></div>';
|
||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||
$employment_img_names = array('attendance_seen_pic' => 'Attendance Register Image', 'sal_reg_seen_pic' => 'Salary Register Image', 'id_card_image' => 'Employee ID card', 'name_board_img' => 'Name Board Image');
|
||
$add_factor = 0;
|
||
for ($row = 0; $row < $tot_rows; $row++) {
|
||
echo '<tr>';
|
||
|
||
$from = $row == 0 ? $row : ($row + $add_factor);
|
||
$to = ($from + 2);
|
||
$add_factor = $add_factor + 2;
|
||
for ($i = $from; $i <= $to; $i++) {
|
||
|
||
if (isset($pd_images['common_images'][$i]) && ($pd_images['common_images'][$i]['pd_document_title'] != 'satellite')) {
|
||
$doc_title = isset($employment_img_names[$pd_images['common_images'][$i]['pd_document_title']]) ? $employment_img_names[$pd_images['common_images'][$i]['pd_document_title']] : $pd_images['common_images'][$i]['pd_document_title'];
|
||
echo '<td style="text-align:center;border:1px solid;"> <img src="' . $pd_images['common_images'][$i]['doc_url'] . '" height = "200" width="200" alt="' . $pd_images['common_images'][$i]['pd_document_title'] . '"/><br>' . $doc_title . '</td>';
|
||
}
|
||
|
||
//unset($p_key);
|
||
}
|
||
echo '</tr>';
|
||
}
|
||
echo '</tbody></table>';
|
||
}
|
||
?>
|
||
<!-- ################# common images #################-->s
|
||
<!-- ########################### End-disclaimer start ######################################### -->
|
||
<?php
|
||
|
||
echo "<p>";
|
||
$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3);
|
||
if (isset($footer_lender_stamp)) {
|
||
//$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3);
|
||
echo '<p align="right"><img height="200" width="200" src="https://pdgenie.com/logo/stamps/' . $footer_lender_stamp['disclaimer'] . '" /></p>';
|
||
}
|
||
|
||
$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2);
|
||
|
||
if (isset($footer_lender_disclaimer)) {
|
||
echo '<p align="center"><i>' . $footer_lender_disclaimer['disclaimer'] . '</i></p>';
|
||
}
|
||
echo "</p>";
|
||
|
||
|
||
?>
|
||
<!-- ########################### End disclaimer end ######################################### -->
|
||
</body>
|
||
|
||
</html>
|