sparqapi/api/application/views/smc_creditpd_reports/MWISE2.php

685 lines
28 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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_name = $master[0]['abbr'];
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
//print_r($master[0]['abbr']);die();
?><!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: #0191ed;
color: white;page-break-inside: inline;
}
/* #########End of Score Card Table Styles######### */
/* ######### 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 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: #0191ed;
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/smc_logo.png'/></div>
<hr>
</header>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="10" >Personal Discussion Sheet - <?php echo $pd_master_details[0]['product_abbr']?> </th>
</tr>
<tr>
<td colspan="3"> Application ID</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $pd_master_details[0]['lender_applicant_id'] ? $pd_master_details[0]['lender_applicant_id'] : 'Not Provided'?> </td>
</tr>
<tr>
<td colspan="3"> Name of the Company/Firm</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($applicant_details[0]['company_name']) ? $applicant_details[0]['company_name'] : $pd_master_details[0]['main_applicant']?></td>
</tr>
<?php if(isset($pd_section_data[1]['person_met']) && $pd_section_data[1]['person_met'] != ''){?>
<tr>
<td colspan="3"> Name of Person Met During Visit and Contact Number</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $pd_section_data[1]['person_met']?> </td>
</tr>
<?php }?>
<!-- <tr>
<td colspan="3"><?php if($master[0]['sales_pd_type'] == 1){echo 'Name of Person Met during visit'; }else{ echo 'Name of the Person Contacted'; } ?></td>
<td class = "tdcenteralign" colspan="7"><?php echo $section1['person_met_during_visit']?></td>
</tr> -->
<tr>
<td colspan="3" rowspan="2" ><?php echo 'Address visited for PD'; ?></td>
<td class = "tdcenteralign" colspan="7"><?php echo $pd_master_details[0]['addressline1']?></td>
</tr>
<tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo$pd_master_details[0]['city_name']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $pd_master_details[0]['state_name']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($pd_master_details[0]['pincode_others'])){ echo $pd_master_details[0]['pincode_others']; } else { echo $pd_master_details[0]['pincode']; }?></td>
</tr>
<?php
if(isset($pd_section_data[2]))
{
if(isset($pd_section_data[2]['alternative_address']) && $pd_section_data[2]['alternative_address'] != '')
{
echo '<tr> <td colspan="3">Actual PD Address</td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['alternative_address'].'</td></tr>';
}
$ownership_type = '';
if( isset($pd_section_data[8]['business_ownership_type']) && (strtolower($pd_section_data[8]['business_ownership_type'])) == 'owned')
{
$ownership_type = '( Owned )';
}
else if(isset($pd_section_data[8]['business_ownership_type']) && (strtolower($pd_section_data[8]['business_ownership_type'])) == 'rented')
{
$ownership_type = ' ( Rented ) - Rent paid '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[8]['business_monthly_rented_amt']);
}
echo '<tr> <td colspan="3">Address Type / Ownership</td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['address_type']['address_type'].$ownership_type.'</td></tr>';
if(isset($pd_section_data[8]['is_business_address']) && strtolower($pd_section_data[8]['is_business_address']) == 'yes')
{
echo '<tr> <td colspan="3">Period for which business has been <br>in operation from this address </td> <td class = "tdcenteralign" colspan="7">'.($pd_section_data[8]['business_years'].' Year(s)'.(isset($pd_section_data[8]['business_months']) && $pd_section_data[8]['business_months'] != '' ? ' & ' . $pd_section_data[8]['business_months'] .' Month(s)': '')).'</td> </tr>';
}
echo '<tr> <td colspan="3">PD locality</td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['pd_locality']['locality_name'].'</td></tr>';
echo '<tr> <td colspan="3">Location Approach</td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['pd_location']['description'].'</td></tr>';
echo '<tr> <td colspan="3">Comment On Locality</td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['comment_locality']['rating'].'</td></tr>';
echo '<tr> <td colspan="3">Estimated Area of Business Premise </td> <td colspan="7" class = "tdcenteralign">'.$pd_section_data[2]['business_estimated_area'].' '.$pd_section_data[2]['uom'].'</td></tr>';
}
?>
</tbody>
</table>
<!-- <div id="page_break"></div> -->
<br><br>
<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 $pd_master_details[0]['start_location'] ? $pd_master_details[0]['start_location'] : '-'; ?></b></p>
<?php if($pd_master_details[0]['start_location']) { ?>
<img style="border:3px solid #0191ed;" src = "<?php echo 'data:image/gif;base64,'.$satellite[0]['img']; ?>" alt = "PD Visted Location Satellite Image " height="270px" 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>';}
?>
<div id="page_break"> </div>
<br>
<table class="scorecard_table">
<tr>
<th class="thlargefont" colspan="4">General Section</th>
</tr>
<?php if(isset($pd_section_data['21']) && count($pd_section_data['21']) && ($pd_section_data['21']['name'] != '') && ($pd_section_data['21']['loan_amount'] != '' )){?>
<tr>
<th colspan="1">Name</th><th colspan="1">Loan Amount</th><th colspan="1">Product</th><th colspan="1">Location</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['21']['name'].'</td><td colspan="1" class = "tdcenteralign">'.$pd_section_data['21']['loan_amount'].'</td><td colspan="1" class = "tdcenteralign">'.$pd_section_data['21']['product'].'</td><td colspan="1" class = "tdcenteralign">'.$pd_section_data['21']['location'].'</td></tr>';
}
else {
echo '<tr> <td colspan="4" class="tdcenteralign"> General Section Not Available</td> </tr>';
}
?>
<tbody>
</tbody>
</table>
<br><br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="3">Profile</th>
</tr>
<?php if(isset($pd_section_data['22']) && count($pd_section_data['22']) && ($pd_section_data['22']['history_vintage'] != '') && ($pd_section_data['22']['primary_partners'] != '' )){?>
<tr>
<th colspan="1">History &  Vintage and  Lineage </th>
<th colspan="1">Primary shareholding , promoters  and major   equity  partners</th>
<th colspan="1">The  capital  structure and details of  the  various  investments vehicles</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['22']['history_vintage'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['22']['primary_partners'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['22']['capital_details'].'</td></tr>';
}
else {
echo '<tr> <td colspan="3" class="tdcenteralign"> Profile Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br><br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="4">Size and Geographical Reach</th>
</tr>
<?php if(isset($pd_section_data['23']) && count($pd_section_data['23']) && ($pd_section_data['23']['aum_book'] != '') && ($pd_section_data['23']['geographical_details'] != '' )){?>
<tr>
<th colspan="1">AUM  (  off book  &  on book  ) &e. Trend of Disbursement in last 2 quarters</th>
<th colspan="3">States  and geographical  regions & Branches  &  geographical  customer base</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['23']['aum_book'].'</td>
<td colspan="3" class = "tdcenteralign">'.$pd_section_data['23']['geographical_details'].'</td></tr>';
?>
<tr>
<th colspan="1">Branches /employees / structure</th>
<th colspan="1">Portfolio concentration and Cuts to be discussed</th>
<th colspan="1">Who are the competitors to the business</th>
<th colspan="1">Estimated Market Size of the Business& Market share</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['23']['branches_employees'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['23']['portfolio_concentration'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['23']['business_competitors'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['23']['estimated_market'].'</td>
</tr>';
}
else {
echo '<tr> <td colspan="4" class="tdcenteralign"> Size and Geographical Reach Not Available</td> </tr>';
}
?>
</tbody>
</table>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="4">Product  &  Processes </th>
</tr>
<?php if(isset($pd_section_data['24']) && count($pd_section_data['24']) && ($pd_section_data['24']['products'] != '') && ($pd_section_data['24']['policies'] != '' )){?>
<tr>
<th colspan="1">Products</th>
<th colspan="1">Policies</th>
<th colspan="1">Credit  appraisal mechanism</th>
<th colspan="1">Technology and  usage  for    acquisition and  credit</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['products'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['policies'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['credit_appraisal'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['technology_credit'].'</td></tr>';
?>
<tr>
<th colspan="1"> Collection policy and   mechanism -Collection efficiency trends in last 12 months (CC/CD, TC/CD,TC/TD) any deviation to be discussed in detail</th>
<th colspan="1"> Provisioning policy</th>
<th colspan="1"> Restructuring policy</th>
<th colspan="1"> Covid  impact and policy</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['collection_policy'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['provisioning_policy'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['restructuring_policy'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['24']['covid_policy'].'</td></tr>';
}
else {
echo '<tr> <td colspan="4" class="tdcenteralign"> Product  &  Processes Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="5">Portfolio Health</th>
</tr>
<?php if(isset($pd_section_data['25']) && count($pd_section_data['25']) && ($pd_section_data['25']['par_book'] != '') && ($pd_section_data['25']['provisioning_resolution'] != '' )){?>
<tr>
<th colspan="1">Par  own book /Par off  book -d</th>
<th colspan="1">NPAs/Provisioning & resolution strategy</th>
<th colspan="1">Strategy to manage flow as well as  post moratorium stress</th>
<th colspan="1">Strategy  for non-paying customers</th>
<th colspan="1">PAR (Productwise)/Net NPAs/Write offs Movement of Bucket ,PAR 90+</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['25']['par_book'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['25']['provisioning_resolution'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['25']['post_morotorium'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['25'][' non-paying_customers'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['25']['par'].'</td>
</tr>';
}
else {
echo '<tr> <td colspan="5" class="tdcenteralign"> Portfolio Health Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="4">Total Overall Debt/Equity Profile</th>
</tr>
<?php if(isset($pd_section_data['26']) && count($pd_section_data['26'])&& ($pd_section_data['26']['dept_structures'] != '') && ($pd_section_data['26']['future_plan'] != '' )){?>
<tr>
<th colspan="1">Types of debt structures and  major debt providers</th>
<th colspan="1">Future plan for additional funding </th>
<th colspan="1">Funding received during covid times including liquidity  support  from  DFIs & Banks</th>
<th colspan="1">Fresh sanctions lined up in the  present month and coming quarters</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['26']['dept_structures'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['26']['future_plan'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['26']['dfi_banks'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['26']['fresh_sanctions'].'</td>
</tr>';
}
else {
echo '<tr> <td colspan="4" class="tdcenteralign"> Total Overall Debt/Equity Profile Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="6">Financial  analysis</th>
</tr>
<?php if(isset($pd_section_data['27']) && count($pd_section_data['27'])&& ($pd_section_data['27']['car_type'] != '') && ($pd_section_data['27']['leverage'] != '' )){?>
<tr>
<th colspan="1">CAR (Tier-1)/CAR (Tier-1 + Tier-2)</th>
<th colspan="1">Leverage (D/E) (excluding Managed)</th>
<th colspan="1">ALM</th>
<th colspan="1">Opex</th>
<th colspan="1">NIM (%) - as per Audited B/S</th>
<th colspan="1">Opex (% of Avg. Book)</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['car_type'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['leverage'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['alm'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['opex'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['nim'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['opex_average'].'</td></tr>';?>
<tr>
<th colspan="1">Opex (% of NII)</th>
<th colspan="1">Return on Assets</th>
<th colspan="1">Return on Equity</th>
<th colspan="1">IRR (Derived)</th>
<th colspan="1">Avg. Borrowing Cost (Derived)</th>
<th colspan="1">Spread (Derived)</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['opex_nii'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['return_asset'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['return_equity'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['irr'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['avg_borrowing'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['27']['spread'].'</td></tr>';
}
else {
echo '<tr> <td colspan="6" class="tdcenteralign"> Financial  analysis Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="1">Overall Plan of Action</th>
</tr>
<?php if(isset($pd_section_data['28']) && count($pd_section_data['28'])&& ($pd_section_data['22']['history_vintage'] != '') && ($pd_section_data['22']['primary_partners'] != '' )){?>
<tr>
<th colspan="1">Future plan on  expansion  geographies wise , products and regions . Equity  and debt structuring as well as  dilution in future. Target book for the present quarter and  YOY   projections</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['28']['future_plan'].'</td></tr>';
}
else {
echo '<tr> <td colspan="1" class="tdcenteralign"> Overall Plan of Action Not Available</td> </tr>';
}
?>
</tbody>
</table>
<br>
<div id="page_break"> </div>
<table class="scorecard_table">
<tbody>
<tr>
<th class="thlargefont" colspan="7">Validation Points vide Systems and Books at HQ & Branches</th>
</tr>
<?php if(isset($pd_section_data['29']) && count($pd_section_data['29']) && ($pd_section_data['29']['stock_validated'] != '') && ($pd_section_data['29']['collateral_coverage'] != '' )){?>
<tr>
<th colspan="1">Stock to be validated from system</th>
<th colspan="1">Collateral coverage for existing borrowing ( System Mapping to be checked)</th>
<th colspan="2">Collection efficiency and system flagging to be counterchecked and same with PAR cuts</th>
<th colspan="1">Sample check of loan dox, application form along with PAN for Active loan accounts</th>
<th colspan="1">Disbursement no to be checked from system</th>
<th colspan="1">Top 20 exposure to be checked with data submitted</th>
</tr>
<?php
echo '<tr><td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['stock_validated'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['collateral_coverage'].'</td>
<td colspan="2" class = "tdcenteralign">'.$pd_section_data['29']['collection_efficiency'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['loan_dox'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['disbursement'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['top20_exposure'].'</td></tr>';?>
<tr>
<th colspan="1">Sample Sanction letters to validate collateral cover stipulated for existing Borrowing</th>
<th colspan="1">Provisioning /Write-off/NPA flagging to be counter checked</th>
<th colspan="1">Restructuring of Loans in system on sample basis</th>
<th colspan="1">EMI cycle date in system</th>
<th colspan="1">Cash and Bank ledger to be checked</th>
<th colspan="1">Free FD details to be taken and validated from Accounting system</th>
<th colspan="1">Application/Systems used for Boarding /Loan management</th>
</tr>
<?php
echo '<tr>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['sanction_letters'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['provisioning'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['restructuring_loan'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['emi_date'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['cash_checked'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['fd_details'].'</td>
<td colspan="1" class = "tdcenteralign">'.$pd_section_data['29']['loan_management'].'</td></tr>';
}
else {
echo '<tr> <td class="tdcenteralign" colspan="7">Validation Points vide Systems and Books at HQ & Branches Not Available</td> </tr>';
}
?>
</tbody>
</table>
<div id="page_break"> </div>
<table class="scorecard_table" style="table-layout: fixed">
<tbody>
<tr>
<th class="thlargefont" colspan="8">Final Remarks of PD officer</th>
</tr>
<?php
if(isset($pd_section_data['19']) && count($pd_section_data['19'])&& ($pd_section_data[19]['pd_officer_recommendation'] != '') && ($pd_section_data[19]['customer_behaviour'] != '' )){
$customer_behaviour = array('1' => 'Others','2' => 'Rude','3' => 'Polite');
$over_all = array('2' => 'Positive','3' => 'Negative');
?>
<tr><td colspan="4">Customer Behaviour
[Polite / Rude / Others (Please specify)]</td><td colspan="4"><?php echo isset($pd_section_data[19]['customer_behaviour_other']) ? $pd_section_data[19]['customer_behaviour_other'] : $customer_behaviour [ $pd_section_data[19]['customer_behaviour'] ];?></td></tr>
<tr><td colspan="4">PD Officer's overall assessment
(Positive / Negative)</td><td colspan="4"><?php echo $over_all [ $pd_section_data[19]['pd_officer_recommendation'] ];?></td></tr>
<?php
$reason = '';
foreach($pd_section_data[19]['pd_officer_recommendation_remarks'] as $key => $val)
{ $reason .= ($key + 1).' '.$val['reason'].'<br>'; }
?>
<tr><td colspan="4">PD Officer's key points considered while arriving at the aforementioned status</td><td colspan="4"><?php echo $reason;?></td></tr>
<?php if(isset($pd_section_data[19]['final_form_remarks']) && !empty($pd_section_data[19]['final_form_remarks'])){
echo '<tr><td colspan="4">Remarks</td><td colspan="4">'.$pd_section_data[19]['final_form_remarks'] .'</td></tr>';
} } else{
echo '<tr> <td class="tdcenteralign" colspan="8">Final Remarks of PD officer Not Available</td> </tr>';
}?>
</tbody></table>
<?php
$iter = 0;
$photo_names = array('person_met' => 'Selfie with person met','person_met_id_proof' => 'Person met ID Proof','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','supplier_image' => 'Supplier Bills','client_image' => 'Client Bills','machinary_image' => 'Machinery Image');
// if($master[0]['sales_pd_type'] == 2){ $photo_names['selfie_with_person_met'] = 'Selfie of the person contacted';}
// echo count($smc_images);die();
//print_r(array_keys($section9));die();
$tot_rows = ceil(count($smc_images) / 3);
if(count($smc_images))
{
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($smc_images[$i]))
{
echo '<td style="text-align:center;border:1px solid;"> <img src="'.$smc_images[$i]['img'].'" height = "200" width="200" alt="'.$smc_images[$i]['img_name'].'"/><br>'.$photo_names [ $smc_images[$i]['img_name'] ].'</td>';
}
//unset($p_key);
}
echo '</tr>';
}
echo '</tbody></table>';
}?>
<br><br>
<table class="scorecard_table">
<tbody>
<tr>
<td colspan="3" >Name of Credit Manager </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['updatedby']?></td>
</tr>
<!-- <tr>
<td colspan="3" >Designation of Sales Team Member </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['updatedby_designation']?></td>
</tr> -->
<tr>
<td colspan="3" >Date of PD Visit </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['pd_visit_date']?></td>
</tr>
</tbody>
</table>
</body>
</html>