sparqapi/api/application/views/sale_pd_templates/FHFSL.php

434 lines
19 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$uparrow = '<span style="color:green;">↑</span>';
$downarrow = '<span style="color:red;">↓</span>';
$dash = '<span style="color:black;"> </span>';
$product_abbr = $master[0]['abbr'];
$product = $master[0]['name'];
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
$title = "";
if($section1['verification_type'] == "Office verification" || $section1['verification_type'] == "Workplace verification"){$title = "Workplace FI for ".$product; }
else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI for ".$product;}
$smc_emp_code = $master[0]['smc_emp_code'];
$residence_ownership_arr = array("self_owned" => "Self-Owned","parental"=>"Parental","family_owned"=>"Family Owned","rented"=>"Rented");
$residence_yr_arr = array("0"=>"< 1 yr","1"=>"1-2 yrs","2"=>"2 to 5 yrs","3"=>"> 5 yrs");
$occupation_arr = array("0"=>"Salaried","1"=>"SENP","2"=>"SEP");
$constitution_arr = array("0"=>"Ltd","1"=>"Pvt","2"=>"Ltd","3"=>"Trust/Society","4"=>"Partnership/LLP","5"=>"Proprietorship");
?><!DOCTYPE html>
<html lang="en">
<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">
<style type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.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;*/
}
/* #########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: inline;
}
.scorecard_table td, .scorecard_table th {
border: 1px solid #000;
padding: 8px;
page-break-inside: inline;
}
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: inline; }
.scorecard_table tr:hover {background-color: #ddd;}
.scorecard_table th {
padding-top: 8px;
padding-bottom: 8px;
text-align: center;
background-color: #0d93a9;
color: white;page-break-inside: inline;
}
/* #########End of Score Card Table Styles######### */
/* #########Score Card2 Table Styles######### */
.scorecard_table2 {
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
/*font-family: Merriweather;*/
border-collapse: collapse;
width: 100%;
page-break-inside: avoid;
}
.scorecard_table2 td, .scorecard_table2 th {
border: 1px solid #000;
padding: 8px;
page-break-inside: avoid;
}
.scorecard_table2 tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid; }
.scorecard_table2 tr:hover {background-color: #ddd;}
.scorecard_table2 th {
padding-top: 8px;
padding-bottom: 8px;
text-align: center;
background-color: #0d93a9;
color: white;page-break-inside: avoid;
}
/* #########End of Score Card 2 Table Styles######### */
.tdcenteralign{ text-align: center; }
.thlargefont{ font-size: 20px; }
</style>
</head>
<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
<footer>
<hr>
<img style="width:100px;height:50px;opacity: 0.5;padding-top: 5px;" src='https://pdgenie.com/logo/sineedge_red.png'/> 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>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="10" ><?php echo $title; ?> </th>
</tr>
<tr>
<td colspan="3"> Lender Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_name_master']) ? $section1['lender_name_master'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Branch</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['branch_master']) ? $section1['branch_master'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Application ID</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['loan_application_id']) ? $section1['loan_application_id'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Lender Sales Person</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_sales_person_master']) ? $section1['lender_sales_person_master'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Lender Credit Person</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_credit_person_master']) ? $section1['lender_credit_person_master'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Product Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['product_name_master']) ? $section1['product_name_master'] : (isset($master[0]['name'])? $master[0]['name'] : 'Not Provided')?> </td>
</tr>
<tr>
<td colspan="3" >Loan Amount Applied for (Rs)</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['loan_amount']) ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount']) : 'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Applicant Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_name']) ? $section1['applicant_name'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Applicant Mobile Number</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_mobile_no']) ? $section1['applicant_mobile_no'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Verification Type</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['verification_type']) ? $section1['verification_type'] : 'Not Provided'; ?> </td>
</tr>
</tbody>
</table>
<br>
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Residence verification"){ ?>
<table class="scorecard_table">
<tr>
<th class="thlargefont" colspan="10">Residence Details</th>
</tr>
<?php if(isset($section1['residence_details'])){
$rd_data = $section1['residence_details'];
for($i = 0; $i < count($rd_data); $i++){?>
<tr>
<td colspan="3"><?php echo ($i+1)." . "; ?>Address Details</td>
<td class = "tdcenteralign" colspan="7"><?php if(isset($rd_data[$i]['residence_address'])){ echo $rd_data[$i]['residence_address']; }else{ echo 'Not Provided'; }?></td>
</tr>
<tr>
<td colspan="2">City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($rd_data[$i]['residence_city_master'])?$rd_data[$i]['residence_city_master']:'Not Provided'; ?></td>
<td colspan="2">State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($rd_data[$i]['residence_state_master'])?$rd_data[$i]['residence_state_master']:'Not Provided'; ?></td>
<td colspan="2">PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($rd_data[$i]['residence_pincode_master']) ?$rd_data[$i]['residence_pincode_master']: 'Not Provided';?></td>
</tr>
<?php } }?>
<tr>
<td colspan="3">Residence Ownership</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $residence_ownership_arr[$section1['residence_ownership']] :'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Years at Current Residence</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_residence']) ? $section1['years_at_current_residence'] : 'Not Provided' ; ?> </td>
</tr>
<tr>
<td colspan="3">Permanent Address Same as Current Residence Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_residence_address'])?$section1['Same_as_current_residence_address']:'Not Provided'; ?> </td>
</tr>
<?php if(isset($section1['Same_as_current_residence_address']) && $section1['Same_as_current_residence_address'] == 'No'){?>
<tr>
<td colspan="3">Permanent Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['permanent_address'])?$section1['permanent_address']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['permanent_city_master'])?$section1['permanent_city_master']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['permanent_state_master'])?$section1['permanent_state_master']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['permanent_pincode_master'])?$section1['permanent_pincode_master']:'Not Provided'; ?></td>
</tr>
<?php } ?>
<tr>
<td colspan="3"> Number of Earning Family Member</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['number_of_earning_family_member'])?$section1['number_of_earning_family_member']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Number of Dependents</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['number_of_dependents'])?$section1['number_of_dependents']:'Not Provided'; ?> </td>
</tr>
<tbody>
</tbody>
</table>
<?php }?>
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Office verification"){ ?>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="10">Office Details</th>
</tr>
<tr>
<td colspan="3">Address Details</td>
<td class = "tdcenteralign" colspan="7"><?php if(isset($section1['officer_address'])){ echo $section1['officer_address']; }else{ echo 'Not Provided'; }?></td>
</tr>
<tr>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['officer_city_master'])?$section1['officer_city_master']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['officer_state_master'])?$section1['officer_state_master']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_master'])?$section1['officer_pincode_master']:'Not Provided'; ?></td>
</tr>
<tr>
<td colspan="3">Occupation of the Loan Applicant</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['occupation_of_the_loan_applicant'])?$occupation_arr[$section1['occupation_of_the_loan_applicant']]:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Employer/Business Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['employer_business_name'])?$section1['employer_business_name']:'Not Provided'; ?> </td>
</tr>
<!-- <tr>
<td colspan="3">Same as Current Business Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_business_address'])?$section1['Same_as_current_business_address']:'Not Provided'; ?> </td>
</tr>
<?php if(isset($section1['Same_as_current_business_address']) && $section1['Same_as_current_business_address'] == 'No'){?>
<tr>
<td colspan="3">Employer/Business Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['business_address'])?$section1['business_address']:'Not Provided'; ?> </td>
</tr>
<!-- <?php // if($section1['employer_business_address'] == 0){ ?> -->
<!-- <tr>
<td colspan="3">Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td>
</tr> -->
<tr>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['business_city_master'])?$section1['business_city_master']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['business_state_master'])?$section1['business_state_master']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_master'])?$section1['business_pincode_master']:'Not Provided'; ?></td>
</tr>
<?php } ?> -->
<tr>
<td colspan="3"> Constitution of Employer /Business </td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['constitution_of_employer_business_applicant']) ? $constitution_arr[$section1['constitution_of_employer_business_applicant']] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Years at Current employment/Business</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_employment_business'])?$section1['years_at_current_employment_business']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Total Work Experience (in Years) </td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['total_work_experience'])?$section1['total_work_experience']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Net Monthly Salary/ Net Income (Rs)</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['net_monthly_salary_net_income'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['net_monthly_salary_net_income']):'Not Provided'; ?> </td>
</tr>
</tbody>
</table>
<?php } ?>
<br>
<div id="page_break"></div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="10">Additional Questions</th>
</tr>
<tr>
<td colspan="3"> Name of Student</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['name_of_student'])?$section1['name_of_student']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Relationship with Applicant</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['relationship_with_applicant_master'])?$section1['relationship_with_applicant_master']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Educational Institute Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_name'])?$section1['educational_institute_name']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Educational Institute Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_address'])?$section1['educational_institute_address']:'Not Provided'; ?> </td>
</tr>
<!-- <tr>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['educational_institute_address_city'])?$section1['educational_institute_address_city']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['educational_institute_address_state'])?$section1['educational_institute_address_state']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['educational_institute_address_pincode'])?$section1['educational_institute_address_pincode']:'Not Provided'; ?></td>
</tr> -->
<tr>
<td colspan="3"> Class /Section/ Course Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['class_section_course_name'])?$section1['class_section_course_name']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Educational Institute Fee (Rs)</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_fee'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['educational_institute_fee']):'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Duration of the Course (months)</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['duration_of_the_course'])?$section1['duration_of_the_course']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3" >Loan Amount Applied for (Rs)</td>
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_amount_applied'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied']):'Not Provided'; ?> </td>
<td colspan="2" >Loan Tenure (Months)</td>
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['loan_tenor'])?$section1['loan_tenor']:'Not Provided'; ?> </td>
</tr>
<!-- <tr>
<td colspan="3">Total Fund Requirement (Rs)</td>
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['total_fund_requirement'])?$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement']):'Not Provided'; ?> </td>
<td colspan="2" ></td>
<td class = "tdcenteralign" colspan="2"></td>
</tr> -->
</tbody>
</table>
<div id="page_break"></div>
<br><table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Satellite Image of PD Location</th></tr></table><br>
<p><b>GPS Coordinates of location where PD Visit was done : <?php echo $geo_location ? $geo_location : '-'; ?></b></p>
<?php if($geo_location) { ?>
<img style="border:3px solid #0d93a9;" src = "<?php echo 'data:image/gif;base64,'.$satellite_image[0]['img']; ?>" alt = "PD Visted Location Satellite Image " height="300px" width="630px">
<?php
}else{ echo '<p>Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown</p>';}
?>
<?php
$iter = 0;
// $photo_names = array('selfie_with_person_met' => 'Selfie with person met','satellite1' => 'satellite');
$photo_names = array('selfie_with_person_met' => 'Selfie with person met','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','workplace_interior_image' => 'Workplace interior image','satellite1' => 'satellite');
$tot_rows = ceil(count($section9) / 3);
if(count($section9))
{
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>';
$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($section9[$i]))
{
echo '<td style="text-align:center;border:1px solid;"> <img src="'.$section9[$i]['img'].'" height = "200" width="200" alt="'.$section9[$i]['img_name'].'"/><br>'.$photo_names [ $section9[$i]['img_name'] ].'</td>';
}
//unset($p_key);
}
echo '</tr>';
}
echo '</tbody></table>';
}
?>
</body>
</html>