sparqapi/api/application/views/report_templates/JSONTOREPORT_FI_RV.php

862 lines
28 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&trade;
</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]['lender_full_name'] . '</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"><u>GENERAL INFORMATION</u>: </h3>';
$general_form = json_decode($pd_processed_forms[27][0]['processed_json'], true);
$value = $general_form['json'];
$all_applicant_details = $applicants_details;
if (strtoupper($value['is_person_met']) == 'YES') {
echo '<p>' . 'Applicant <b>('.$value['Name_of_the_Person_met_master'].')</b> was met at the visited address.' . '</p>';
}else if (strtoupper($value['is_person_met']) == 'NO') {
echo '<p>' . '('.$value['Name_of_the_Person'].') ('.$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"><u>ADDRESS DETAILS</u>: </h3>';
if (strtoupper($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 (strtoupper($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"><u>VISIT DETAILS</u>: </h3>';
$residence_visit_data = json_decode($pd_processed_forms[30][0]['processed_json'], true);
$rv_value = $residence_visit_data['json'];
$year = (abs($rv_value['year'])>=2) ? $rv_value['year'].' Years' : $rv_value['year'].' Year';
$month = '';
if($rv_value['month'] > 0 && (!empty($rv_value['month'])) && isset($rv_value['month'])){
$month = (abs($rv_value['month'])>=2) ? $rv_value['month'].' Months' : $rv_value['month'].' 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(strtoupper($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(strtoupper($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'];
// print_r($neighbour_value);
$neighbourhood_form_common_remarks = $neighbour_value['neighbourhood_remarks'];
// if(strcasecmp($neighbour_value['neighbourhood_status'],'Could Not Verify')){
$pd_offiecer_status_about_neighbor = $neighbour_value['neighbourhood_status'];
// }
$neighbourhood_form_common_remarks = isset($neighbour_value['neighbourhood_remarks']) ? $neighbour_value['neighbourhood_remarks'] : null;
?>
<h3 contenteditable="true"><u>NEIGHBOURHOOD / REFERENCE CHECK</u></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(isset($neighbour_value['know_organisation_owner']) && strtoupper($neighbour_value['know_organisation_owner']) == 'YES'){
if(isset($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]) && !empty($pd_processed_forms[31])) {
$credit_officier_specific_querie = json_decode($pd_processed_forms[31][0]['processed_json'], true);
$credit_officier_specific_queries = $credit_officier_specific_querie['json'];
// print_r($credit_officier_specific_queries);
}
echo '<br>';
echo '<h3 contenteditable="true"><u>CREDIT MANAGER`S SPECIFIC QUERIES</u>:</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"><u>DOCUMENT TO BE PHOTOGRAPHED/SCANNED</u>: </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 ) : ' . (strtoupper($doc_value['ans']) == 'YES' ? 'YES, Document available in zipped file enclosed with report' . '<br>' : 'NO<br>');
if (strtoupper($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"><u>VISITING OFFICER`S REMARKS</u></h3>
<?php
$final_remark = json_decode($pd_processed_forms[33][0]['processed_json'],true) ;
$final_remark_data = $final_remark['json'];
//print_r($final_remark_data);
$positive = null;
$negative = null;
$refer_to_credit = null;
$Could_not_verfiy = null;
$fo_diplay = null;
if(isset($final_remark_data['final_status_of_visit'])){
if ($final_remark_data['final_status_of_visit'] == 'Couldnotverfiy') {
$Could_not_verfiy = 1;
$fo_diplay = "Could not verfiy";
} else if ($final_remark_data['final_status_of_visit'] == 'Positive') {
$positive = 1;
$fo_diplay = "Positive";
} else if ($final_remark_data['final_status_of_visit'] == 'Negative') {
$negative = 1;
$fo_diplay = "Negative";
}}
$pd_officer_final_remark = isset($final_remark_data['common_remarks']) ? $final_remark_data['common_remarks'] : '';
?>
<div>
<ul>
<?php $tick_mark = '<span style="font-family: DejaVu Sans; sans-serif;font-size:12px">✔</span>';
?>
<br>
<li>Final Status of Field Visit: </li>
<br><br>
<table>
<tr>
<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:red;color:black;">Negative</div>
<div id="tick_div" style="border-color:red;color:black;"><?php if ($negative) {
echo $tick_mark;
} ?></div>
</td>
<td style="padding-left:50px;">
<div id="first_div" style="border-color:#ffff00;color:black;">Could not verfiy</div>
<div id="tick_div" style="border-color:#ffff00;color:black;"><?php if ($Could_not_verfiy) {
echo $tick_mark;
} ?></div>
</td>
</tr>
</table>
<br>
</ul>
<br>
<li>Remarks:</li>
<?php echo '<p style="text-align:justify;">' . $pd_officer_final_remark . '</p>' ?>
</div>
<!-- ################# 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 #################-->
<?php
// $filtered_arr = array_filter($pd_images['34'], function ($var) {
// return ($var['isactive'] != 0);
// });
if (count($pd_images['34'])) {
$pd_images['common_images'] = array_values($pd_images['34']);
$tot_rows = ceil(count($pd_images['common_images']) / 2);
echo '<div id="page_break"></div>';
echo '<h3 contenteditable="true"><u>VISIT PICTURES</u></h3>';
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
$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 = $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 #################-->
<!-- ########################### 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>