393 lines
14 KiB
PHP
393 lines
14 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
?><!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
::selection { background-color: #E13300; color: white; }
|
|
::-moz-selection { background-color: #E13300; color: white; }
|
|
|
|
body {
|
|
background-color: #fff;
|
|
margin: 5px;
|
|
font: 13px normal Helvetica, Arial, sans-serif;
|
|
color: #4F5155;
|
|
}
|
|
|
|
a {
|
|
color: #003399;
|
|
background-color: transparent;
|
|
font-weight: normal;
|
|
}
|
|
|
|
/*h1 {
|
|
color: #444;
|
|
background-color: transparent;
|
|
border-bottom: 1px solid #D0D0D0;
|
|
font-size: 19px;
|
|
font-weight: normal;
|
|
margin: 0 0 14px 0;
|
|
padding: 14px 15px 10px 15px;
|
|
}*/
|
|
|
|
code {
|
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
|
font-size: 12px;
|
|
background-color: #f9f9f9;
|
|
/* border: 1px solid #D0D0D0;*/
|
|
color: #002166;
|
|
/*display: block;*/
|
|
/*margin: 14px 0 14px 0;*/
|
|
padding: 2px 2px 2px 2px;
|
|
}
|
|
|
|
#body {
|
|
margin: 0 15px 0 15px;
|
|
}
|
|
|
|
p.footer {
|
|
text-align: right;
|
|
font-size: 11px;
|
|
border-top: 1px solid #D0D0D0;
|
|
line-height: 32px;
|
|
padding: 0 10px 0 10px;
|
|
margin: 20px 0 0 0;
|
|
}
|
|
|
|
#container {
|
|
margin: 1px;
|
|
border: 1px solid #D0D0D0;
|
|
box-shadow: 0 0 8px #D0D0D0;
|
|
}
|
|
data{
|
|
font-weight:bold;
|
|
}
|
|
table {
|
|
font-family: arial, sans-serif;
|
|
font-size:10px;
|
|
border-collapse: collapse;
|
|
width: 50%;
|
|
color: #002166;
|
|
}
|
|
|
|
td, th {
|
|
border: 1px solid #dddddd;
|
|
text-align: center;
|
|
padding: 2px;
|
|
}
|
|
|
|
<! -- tr:nth-child(even) {
|
|
background-color: #dddddd;
|
|
} -->
|
|
</style>
|
|
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<?php
|
|
echo "<h1><center><data>PERSONAL DISCUSSION REPORT</data></center></h1> ";
|
|
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
|
|
echo "<h2><center><data >".$pd_master_details[0]['title_name'].$pd_master_details[0]['main_applicant']."</data></center></h2>";
|
|
echo "<p><code>PD Report Date : <data>".$pd_master_details[0]['updatedon']."</data></code></p>";
|
|
echo "<p><code>PD Vist Date : <data>".$pd_master_details[0]['scheduled_on']."</data></code></p>";
|
|
echo "<p><code>PD Initiated by <data>".$pd_master_details[0]['branch_name']." </data>Branch</code></p>";
|
|
echo "<p><code>Loan Applicant ID : <data>".$pd_master_details[0]['lender_applicant_id']."</data></code></p>";
|
|
echo "<p><code>Loan Amount Applied For :</code></p>";
|
|
echo "<p>
|
|
<table>
|
|
<thead> <tr> <th>As Per PD Initiation</th> <th>As Per Loan Applicants during PD</th> </tr></thead>
|
|
|
|
<tbody>
|
|
<tr> <td>." . number_format($pd_master_details[0]['loan_amount']). ".</td> <td> #### </td> </tr>
|
|
</tbody>
|
|
</table>
|
|
</p>";
|
|
|
|
echo "<p><code>Product : <data>".$pd_master_details[0]['product_name']."</data></code></p>";
|
|
echo "<p><code>Customer Segment : <data>".$pd_master_details[0]['customer_segment_name']."</data></code></p>";
|
|
|
|
?>
|
|
<ul>
|
|
|
|
<?php
|
|
|
|
if(count($pd_processed_forms[13]))
|
|
{
|
|
$business_details = json_decode($pd_processed_forms[13][0]['processed_json'],true);
|
|
//print_r($business_details);die();
|
|
$name_of_the_business_entity = "####";
|
|
if($business_details['profession_name'] != "") {$name_of_the_business_entity = $business_details['profession_name'];}else { $name_of_the_business_entity = $business_details['profession_name']; }
|
|
?>
|
|
<li>Name of the Business Entity : <data> <?php echo $name_of_the_business_entity; ?><data></li>
|
|
<li>Business Entity Type : <data><?php echo $business_details['business_entity_type_master']?></data></li>
|
|
<li>Business Vintage : <data><?php echo $business_details['business_years'] .' Year(s) & '.$business_details['business_month'] .' Month(s)'?></data></li>
|
|
<?php
|
|
$type_of_business_activity = "";
|
|
foreach($business_details['select_business_activity_type'] as $key => $value)
|
|
{
|
|
$type_of_business_activity .= $value['name'].',';
|
|
|
|
}
|
|
?>
|
|
<li>Type of Business Activity : <data><?php echo substr($type_of_business_activity,0,strlen($type_of_business_activity)-1)?></data></li>
|
|
<li>Key Products : <data><?php echo $name_of_the_business_entity?></data></li>
|
|
<li>Brief of key persons connected with the business / profession : </li>
|
|
</ul>
|
|
<p></p>
|
|
<table style="width:100%">
|
|
<thead><tr> <th>S.NO</th> <th>Name</th> <th>Relation To</th> <th>Relationship</th> <th>Business Started By</th> <th>Loan Applicant (As per person met)</th> <th>Actively Involved in Business</th> <th> Share of Profit / Shareholding (%)</th> <th> No of years in (Name of Business Entity)</th> <th>Total Business Experience
|
|
(Years) </th> </tr></thead>
|
|
<tbody>
|
|
<?php
|
|
foreach($business_details['partners'] as $partners_key => $partner)
|
|
{
|
|
echo "<tr><td>".($partners_key + 1)."</td>
|
|
<td>".$partner['partner_name']."</td>
|
|
<td>".$name_of_the_business_entity."</td>
|
|
<td>". "XXX"."</td>
|
|
<td>"."XXX"."</td>
|
|
<td>".'XXX'."</td>
|
|
<td>".'XXX'."</td>
|
|
<td>".$partner['shareholding']."%</td>
|
|
<td>".$partner['current_business_experiance_year'].'.'.$partner['current_business_experiance_month']."</td>
|
|
<td>".$partner['total_business_experiance']."</td> </tr>";
|
|
}
|
|
|
|
foreach($business_details['persons_with_relationships'] as $persons_with_relationships_key => $persons_with_relationship)
|
|
{
|
|
echo "<tr><td>".(count($business_details['partners']) + 1)."</td>
|
|
<td>".$persons_with_relationship['family_member_name']."</td>
|
|
<td>".$persons_with_relationship['relation_to_id_master']."</td>
|
|
<td>".$persons_with_relationship['other_family_relationship_id_master']."</td>
|
|
<td>".$persons_with_relationship['started_business']."</td>
|
|
<td>".'XXX'."</td>
|
|
<td>".'XXX'."</td>
|
|
<td>".'NA'."</td>
|
|
<td>".'NA'."</td>
|
|
<td>".'XXX'."</td> </tr>";
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<p></p>
|
|
<ul>
|
|
<li>Brief of Business Entity, Ownership and Areas of Operations:</li>
|
|
<p>
|
|
<?php
|
|
echo "<data>" . $name_of_the_business_entity. "</data>, is a ” <data>".$business_details['business_entity_type_master']." “</data> concern, formed in ”<data>".$business_details['business_date_object']."</data>.<br>" ;
|
|
switch($business_details['business_entity_type'])
|
|
{
|
|
case 1:// Private Limited Company
|
|
foreach($business_details['partners'] as $partners_key => $partner)
|
|
{
|
|
echo "<data>" . $partner['partner_name']. "</data> is (relation to company) of <data>".$name_of_the_business_entity."</data> having <data>". $partner['shareholding']."%</data> shareholding.<br>";
|
|
}
|
|
break;
|
|
case 2:// Public Ltd Company
|
|
break;
|
|
case 3:// Sole proprietorship
|
|
break;
|
|
case 4:// HUF (Hindu Undivided Family)
|
|
break;
|
|
case 5:// Partnership
|
|
foreach($business_details['partners'] as $partners_key => $partner)
|
|
{
|
|
echo "<data>" . $partner['partner_name']. "</data> is partner of <data>".$name_of_the_business_entity."</data> having ". $partner['shareholding']."% shareholding.<br>";
|
|
}
|
|
break;
|
|
case 6:// Cooperative
|
|
break;
|
|
case 7:// Limited Liability Partnership(LLP)
|
|
foreach($business_details['partners'] as $partners_key => $partner)
|
|
{
|
|
echo $partner['partner_name']. " is (relation to company) of ".$name_of_the_business_entity." having ". $partner['shareholding']."% share in properties.<br>";
|
|
}
|
|
break;
|
|
case 8:// OPC (One Person Company)
|
|
break;
|
|
case 9:// Society
|
|
break;
|
|
case 10:// Trust
|
|
break;
|
|
case 11:// Others (Please Specify)
|
|
break;
|
|
default: echo "Nothing Defined";
|
|
|
|
}
|
|
|
|
$brief_product_details = "";
|
|
foreach($business_details['select_business_activity_type'] as $business_activity)
|
|
{
|
|
$key_items_word = "";
|
|
$item_sold_word = "";
|
|
$area_of_sold = "";
|
|
|
|
if($business_activity['type_of_activity_id'] == 1)//Manufacturing and trading
|
|
{
|
|
$key_items_word = "Key Prodcuts";
|
|
$item_sold_word = "sold";
|
|
$with_in_india = 0;
|
|
$export = 0;
|
|
$both = 0;
|
|
|
|
|
|
//$single_prodcut = "";
|
|
foreach($business_details['manufacturing_activity_details'] as $manufacturing)
|
|
{
|
|
$states = "";
|
|
$cities = "";
|
|
if(!strcasecmp('Within India',$manufacturing['area_of_sale']))
|
|
{
|
|
$with_in_india++;
|
|
}
|
|
if(!strcasecmp('Export',$manufacturing['area_of_sale']))
|
|
{
|
|
$export++;
|
|
}
|
|
if(!strcasecmp('Both',$manufacturing['area_of_sale']))
|
|
{
|
|
$both++;
|
|
}
|
|
|
|
if(array_key_exists('india_where_sale_done',$manufacturing))
|
|
{
|
|
foreach($manufacturing['india_where_sale_done'] as $india_sales)
|
|
{
|
|
$states .= $india_sales['state_name'].',';
|
|
$cities .= implode(",",$india_sales['city_name']).',';
|
|
}
|
|
}
|
|
|
|
if(array_key_exists('max_sale_state_name',$manufacturing))
|
|
{
|
|
foreach($manufacturing['max_sale_state_name'] as $india_sales)
|
|
{
|
|
// $states .= implode(",",$india_sales['state_name']).',';
|
|
// $cities .= implode(",",$india_sales['city_name']).',';
|
|
print_r($india_sales['state_name']);
|
|
print_r($india_sales['city_name']);
|
|
}
|
|
}
|
|
|
|
$single_prodcut = "<br><data>".$manufacturing['main_products'] ." </data>". $item_sold_word . " in throughtout <data>". substr($states,0,strlen($states)-1) ."</data> in <data>".substr($cities,0,strlen($cities)-1).".</data><br>";
|
|
$brief_product_details .= $single_prodcut;
|
|
//echo $single_prodcut;
|
|
|
|
}
|
|
|
|
|
|
//echo $single_prodcut;
|
|
|
|
if(($with_in_india != 0 && $export != 0) || $both = 0) { $area_of_sold = " “within India” / “outside India” ";}
|
|
else if($with_in_india != 0) { $area_of_sold = " “within India” "; }
|
|
else if($export != 0) { $area_of_sold = " “outside India” "; }
|
|
}
|
|
else if($business_activity['type_of_activity_id'] == 2)
|
|
{
|
|
$key_items_word = "Key Prodcuts";
|
|
$item_sold_word = "sold";
|
|
}
|
|
else if($business_activity['type_of_activity_id'] == 3)
|
|
{
|
|
$key_items_word = "Key Services";
|
|
$item_sold_word = "provided";
|
|
}
|
|
echo "<br><data>".$name_of_the_business_entity. "</data>, is into “<data>".$business_activity['name']."</data>” of ".$key_items_word.". These ".$key_items_word." , are ".$item_sold_word ."<data>". $area_of_sold ."</data>";
|
|
echo "<p></p>";
|
|
|
|
|
|
echo "$brief_product_details<br>";
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
<li>
|
|
<?php
|
|
|
|
if($business_details['employees_total'] != $business_details['employees_permanent'])
|
|
{
|
|
echo "As Per <data>(Name of Person met)</data> the total number of employees in <data>$name_of_the_business_entity</data> is <data>".$business_details['employees_total']."</data> During the visit at the ”<data>(Address Type)</data>“, the PD officer sighted ”<data>".$business_details['officer_total']."</data>“ employees. “As per,” <data>(Name of person met), ".$business_details['employees_permanent']." </data>“employees are permanent employees and” <data>".$business_details['employees_temporary']."</data>“employees are temporary employees.";
|
|
}
|
|
else
|
|
{
|
|
echo "As Per <data>(Name of Person met)</data> the total number of employees in <data>$name_of_the_business_entity</data> is <data>". $business_details['employees_total']."</data>. During the visit at the ”<data>(Address Type)</data>“, as per ”<data>(Name of person met)</data>“, all employees of” <data>$name_of_the_business_entity</data> “are permanent employees.” ";
|
|
}
|
|
?>
|
|
</li>
|
|
|
|
<li>
|
|
<?php
|
|
echo "The following Business / Profession documents were sighted:<br>";
|
|
if(!strcasecmp(strtolower($business_details['shop_eat_act_cert']),'yes'))
|
|
{
|
|
echo "Shop Eat Act Certificate<br><br>";
|
|
echo '<center><img src ="https://www.excel-easy.com/data-analysis/images/charts/switched-column-chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
if(!strcasecmp(strtolower($business_details['gst_Regn_cert']),'yes'))
|
|
{
|
|
echo "GST Certificate<br><br>";
|
|
echo '<center><img src ="https://docs.moodle.org/dev/images_dev/a/a9/doughnut_pie_chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
if(!strcasecmp(strtolower($business_details['export_import_cert']),'yes'))
|
|
{
|
|
echo "Export/Import Certificate<br><br>";
|
|
echo '<center><img src ="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQwglb11xX5OpjBx2pV2CcUbqvl5jx4XQjtkyL2ovPTcJ8t6dgdPA" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
if(!strcasecmp(strtolower($business_details['factory_cert']),'yes'))
|
|
{
|
|
echo "Factory Certificate<br><br>";
|
|
echo '<center><img src ="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSUbbTfrL1uwoYc3PkVZmVxKK35iZaEMUZHmrqlgcd8ej988ws9" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
if(!strcasecmp(strtolower($business_details['practice_cert']),'yes'))
|
|
{
|
|
echo "Practice Certificate<br><br>";
|
|
echo '<center><img src ="https://www.excel-easy.com/data-analysis/images/charts/switched-column-chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
if(!strcasecmp(strtolower($business_details['pf_regn']),'yes'))
|
|
{
|
|
echo "PF Certificate<br><br>";
|
|
echo '<center><img src ="https://www.excel-easy.com/data-analysis/images/charts/switched-column-chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
}
|
|
// if(!strcasecmp(strtolower($esic_regn),'yes'))
|
|
// {
|
|
// echo "ESI Certificate<br><br>";
|
|
// echo '<center><img src ="https://www.excel-easy.com/data-analysis/images/charts/switched-column-chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
// }
|
|
// if(!strcasecmp(strtolower($other_documents),'yes'))
|
|
// {
|
|
// echo "Others Certificate<br><br>";
|
|
// echo '<center><img src ="https://www.excel-easy.com/data-analysis/images/charts/switched-column-chart.png" alt ="image not available" height="100" width="100"/></center>';
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
?>
|
|
</li>
|
|
</ul>
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|