sparqapi/api/application/views/report_templates/JSONTOREPORT_karthick.php
2019-02-26 17:51:18 +05:30

1433 lines
48 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">
.page_break { page-break-before: always; }
@page {
margin: 50px 25px;
}
header {
position: fixed;
top: 10px;
left: 0px;
right: 0px;
height: 30px;
/** Extra personal styles **/
/*background-color: #03a9f4;
color: white;*/
text-align: center;
/* line-height: 35px;*/
}
footer {
position: fixed;
bottom: 5px;
left: 0px;
right: 0px;
height: 30px;
/** Extra personal styles **/
/*background-color: #03a9f4;
color: white;*/
text-align: right;
/*line-height: 35px;*/
}
.table2 {
width: 100%;
border-collapse: collapse;
}
.table2 td {
height: 50px;
text-align: center;
border: 1px solid black;
}
.table2 th {
height: 50px;
text-align: center;
border: 1px solid black;
}
.table3 {
width: 100%;
padding: 10px;
border-collapse: collapse;
}
.table3 td {
height: 50px;
text-align: center;
}
.table3 th {
height: 50px;
text-align: center;
}
tfoot{
color:#e00201;
}
</style>
</head>
<body >
<!-- Define header and footer blocks before your content
<header>
Our Code World
</header> -->
<footer>
<hr>
<div><img style="width:150;height:40px;" src='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' /></div>
</footer>
<!-- Wrap the content of your PDF inside a main tag -->
<?php
//echo "<br><br><br><br><br><br><br><br><br>";
echo "<div style='background-color:#add1eb;font-style:italic'>";
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 "</div>";
echo "<br><br><br><br>";
?>
<table>
<tbody>
<?php
echo "<tr><td>PD Report Date </td><td><data>".$pd_master_details[0]['updatedon']."</data></td>";
echo "<tr><td>PD Vist Date </td><td> <data>".$pd_master_details[0]['scheduled_on']."</data></td></tr>";
echo "<tr><td>PD Initiated by </td><td><data>".$pd_master_details[0]['branch_name']." </data>Branch</td></tr>";
echo "<tr><td>Loan Applicant ID </td><td> <data>".$pd_master_details[0]['lender_applicant_id']."</data></td></tr>";
echo "<tr><td>Product </td><td>".$pd_master_details[0]['product_name']."</td></tr>";
echo "<tr><td>Customer Segment </td><td>".$pd_master_details[0]['customer_segment_name']."<td></tr>";
?>
</tbody>
</table>
<?php
echo "<p>Loan Amount Applied For </p>";
echo "<p>
<table border=1 style='border-collapse:collapse;text-align:center;'>
<thead> <tr> <th>As Per PD Initiation</th> <th>As Per Loan Applicants during PD</th> </tr></thead>
<tbody>
<tr> <td>Rs " . number_format($pd_master_details[0]['loan_amount']). ".</td> <td> #### </td> </tr>
</tbody>
</table>
</p>";
echo "<div class='page_break'></div>";
//####################General Section Statred########################
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
$persons_met = "Default";
$all_company_details = null;
if(array_key_exists('companies',$general_form))
{
$all_company_details = $general_form['companies'];
}
//echo MYUITIL::findCompanyName($all_company_details,2,1);
?>
<h3>General Section Information</h3>
<table>
<tbody>
<tr>
<td>Person(s) Met&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><?php
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_person_met'] == true)
{
echo ($individual['applicant_title_name_master'] .$individual['pd_co_applicant_id_master']);
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
echo '<br>'.$company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name'];
}
}
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && $persons_with_relationship['relationship'] != null)
{
echo '<br>'.$persons_with_relationship['relationship_master'] .' Of '.$persons_with_relationship['relation_to_master'];
//print_r($persons_with_relationship);
}
}
}
}
?>
</td></tr>
</tbody>
</table>
<p>Loan Applicants</p>
<!-- <table border=1 style='border-collapse:collapse;'> -->
<table class="table2">
<?php
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_applicant'] == true)
{
echo "<tr><td>".$individual['applicant_title_name_master'].$individual['pd_co_applicant_id_master']."</td><td>";
foreach($general_form['company_with_relationships'] as $company_with_relationship)
{
if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
{
//FInd Company Name from JSON
print_r($company_with_relationship['company_relationship_master'] .' Of '.$company_with_relationship['company_name']);
}
}
foreach($general_form['persons_with_relationships'] as $persons_with_relationship)
{
if($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && $persons_with_relationship['relationship'] != null)
{
echo "<br><br>";
print_r($persons_with_relationship['relationship_master'] .' Of '.$persons_with_relationship['relation_to_master']);
//print_r($persons_with_relationship);
}
}
echo "</tr>";
}
}
?>
</table>
<p>PD Officer's Note (About General Section) :</p> <?php echo $general_form['general_remark']; ?>
<?php $address_form = json_decode($pd_processed_forms[5][0]['processed_json'],true);
?>
<p><b>Location Details :</b></p>
<p><?php echo "The applicants were met at their ".$address_form['address_type_master']." at ".$address_form['address'].". The PD location is situated in an area that can be classified as ".$address_form['locality_master'].", and the approach was ".$address_form['pd_location_master'].". The locality was ".$address_form['comment_locality_master'].".";?></p>
<p><b>PD Officer's Note (About Location Details) :</b></p> <?php echo $address_form['address_form_remark']; ?>
<?php $loan_form = json_decode($pd_processed_forms[10][0]['processed_json'],true);?>
<br>
<p><b>Loan Details :</b></p>
<?php echo "A loan for Rs ".number_format($loan_form['loan_amount'])." (".MYUITIL::numtowords($loan_form['loan_amount']).") has been applied by the applicant for ".$loan_form['end_use_master'][0].".";
if($loan_form['is_transfer'] == 'yes')
{
echo "There is a balance transfer of Rs. ".number_format($loan_form['balance_transfer_amount'])." (".MYUITIL::numtowords($loan_form['balance_transfer_amount']).")from ".$loan_form['lender_master']."),and the balance top up of Rs.".$loan_form['topup_amount']." is to be used for ".$loan_form['end_use_topup_master'].". The applicants are comfortable to pay an EMI of Rs.".number_format($loan_form['emi_level'])." per month.";
}
else
{
$own_contribution_string = "";
if(count($loan_form['source_of_own_contribution_master']))
{
$own_contribution_string = implode(" , ",$loan_form['source_of_own_contribution_master']);
}
// echo $own_contribution_string;
// echo "#################".strripos($own_contribution_string,',');
if($loan_form['other_source'] != "")
{
$own_contribution_string = substr_replace($own_contribution_string,"and",strripos($own_contribution_string,','),1);
}
echo "The amount of Rs.".number_format($loan_form['own_contribution'])." as own contribution from ".$own_contribution_string.". The applicants are comfortable to pay an EMI of Rs.".number_format($loan_form['emi_level'])." per month.";
}
//print_r($loan_form['owners_list_master']);
$owners_list = "";
if(count($loan_form['owners_list_master']))
{
foreach($loan_form['owners_list_master'] as $owner)
{
$owners_list .= $owner." , ";
}
$owners_list = substr($owners_list,0,(strlen($owners_list)-2));
}
//echo "#################".strripos($owners_list,',');
$owners_list = substr_replace($owners_list," and ",strripos($owners_list,','),1);
echo "The property being mortgaged is a ".$loan_form['property_type_master']." owned by ".$owners_list.", and is ".$loan_form['construction_status_master']." with an estimated market value of Rs ".number_format($loan_form['emv_per_customer'])."(".MYUITIL::numtowords($loan_form['emv_per_customer']).")";
?>
<br>
<p><b>PD Officer's Note (About Loan Details) :<b></p> <?php echo $loan_form['loandetails_remarks']; ?>
<!-- ####################End Of General Section Statred########################-->
<!-- business section start -->
<?php
$businessResult=array();
foreach($pd_processed_forms[13] as $browKey=> $bRow) {
$businessRow = json_decode($bRow['processed_json'],true);
$companyList = MYUITIL::findCompanyName($all_company_details,$businessRow['company_id'],2);
//$companyList .=' The director details are as under :';
$bindEachResult["company_name"]=$companyList;
// this is for partner details
if(array_key_exists('partners',$businessRow)){
$bindEachResult["partner"]=Businessform::getPartnerDetails($businessRow['partners']);
}
else {
$getPartner=array();
$bindEachResult["partner"]=$getPartner;
}
// this is for person with relationship
if(array_key_exists('persons_with_relationships',$businessRow)){
$bindEachResult["family_members_involved"]=Businessform::getFamilyMemberDetails($businessRow['persons_with_relationships']);
}
else {
$getFamilyMembers=array();
$bindEachResult["family_members_involved"]=$getFamilyMembers;
}
// this is for manufacturing activities
if(array_key_exists('manufacturing_activity_details',$businessRow)){
$bindEachResult['manufacturing'] = Businessform::getActivityDetails($businessRow['manufacturing_activity_details'],1);
}
else{
$getManufacturingRow=array();
$bindEachResult['manufacturing']=$getManufacturingRow;
}
// this is for retail activites
if(array_key_exists('retail_trading_activity_details',$businessRow)){
$bindEachResult['retail'] = Businessform::getActivityDetails($businessRow['retail_trading_activity_details'],2);
}
else{
$getRetailRow=array();
$bindEachResult['retail']=$getRetailRow;
}
// this is for whole sale activites
if(array_key_exists('wholesale_trading_activity_details',$businessRow)){
$bindEachResult['wholesale'] = Businessform::getActivityDetails($businessRow['wholesale_trading_activity_details'],3);
}
else{
$getWholesaleRow=array();
$bindEachResult['wholesale']=$getWholesaleRow;
}
// this is for service provider
if(array_key_exists('service_provider_activity_details',$businessRow)){
$bindEachResult['serviceprovider']=Businessform::getActivityDetails($businessRow['service_provider_activity_details'],4);
}
else{
$getServiceproviderRow=array();
$bindEachResult['serviceprovider']=$getServiceproviderRow;
}
// this is for other activity details
if(array_key_exists('others_activity_details',$businessRow)){
$bindEachResult['otheractivity']=Businessform::getActivityDetails($businessRow['others_activity_details'],5);
}
else{
$getOtheractivityRow=array();
$bindEachResult['otheractivity']=$getOtheractivityRow;
}
// this if for get business peak period
if(strtoupper($businessRow['seasonality'])=='YES' && array_key_exists('peak_period_of_business',$businessRow)){
$bindEachResult['business_peak_details']=Businessform::getBusinessPeakDetails($businessRow['peak_period_of_business']);
}
else{
$bindEachResult['business_peak_details']='The Business has no major changes in sales across season.';
}
// this is for no of employess details
$bindEachResult['company_empployees']='As per person met there are '.$businessRow['employees_permanent'].' permanent and '.$businessRow['employees_temporary'].' temporary employees with company.';
$bindEachResult['officer_visit_company_empployees']='The PD Officer could notice approximately '.$businessRow['officer_total'] .' employees during the visit.';
//this is documents visited
$getDocuments=array();
if(array_key_exists('shop_eat_act_cert',$businessRow) && strtoupper($businessRow['shop_eat_act_cert'])=='YES'){
array_push($getDocuments,'Shop/Est act Certificate.');
}
if(array_key_exists('gst_Regn_cert',$businessRow) && strtoupper($businessRow['gst_Regn_cert'])=='YES'){
array_push($getDocuments,'GST Registration.');
}
if(array_key_exists('pf_regn',$businessRow) && strtoupper($businessRow['pf_regn'])=='YES'){
array_push($getDocuments,'PF Registration.');
}
if(array_key_exists('esic_regn',$businessRow) && strtoupper($businessRow['esic_regn'])=='YES'){
array_push($getDocuments,'ESIC Registration.');
}
if(array_key_exists('export_import_cert',$businessRow) && strtoupper($businessRow['export_import_cert'])=='YES'){
array_push($getDocuments,'Export/Import Certificate.');
}
if(array_key_exists('factory_cert',$businessRow) && strtoupper($businessRow['factory_cert'])=='YES'){
array_push($getDocuments,'Factory Certificate.');
}
if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){
foreach($businessRow['documents'] as $docValue){
array_push($getDocuments,$docValue['document'].'.');
}
}
$bindEachResult['visit_documents']=$getDocuments;
array_push($businessResult,$bindEachResult);
}
?>
<h3>Business Details</h3>
<?php
foreach($businessResult as $bKey=>$fetchRow){
?>
<div><p><strong>About Company :</strong><span><?php echo $fetchRow['company_name'];?></span></p></div>
<div><p>The director details are as under :</p></div>
<table class="table2">
<thead>
<tr>
<th>Name</th>
<th>Share Holding</th>
<th>No.of Years in Current Business</th>
<th>Total Work Experience</th>
<th>Previous Experience</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['partner'] as $partRow){
?>
<tr>
<td><?php echo $partRow['name'] ?></td>
<td><?php echo $partRow['share_holding'] ?></td>
<td><?php echo $partRow['no_years_business'] ?></td>
<td><?php echo $partRow['total_experience']?></td>
<td><?php echo $partRow['previous_experience']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<!--this is for family members involved in business -->
<?php if(count($fetchRow['family_members_involved']) >0){ ?>
<div>
<p>Besides the above, the below family members are also involved in the business :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Name</th>
<th>Relation</th>
<th>Designation</th>
<th>Started Business</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['family_members_involved'] as $familyRow){
?>
<tr>
<td><?php echo $familyRow['name'] ?></td>
<td><?php echo $familyRow['relation'] ?></td>
<td><?php echo $familyRow['designation'] ?></td>
<td><?php echo $familyRow['started_business']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }?>
<!-- end family members -->
<!-- start manufacturing -->
<?php if(count($fetchRow['manufacturing']) >0){ ?>
<div>
<p> The Manufacturing details are as under :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Products</th>
<th>Area of Sale</th>
<th>Sales Done</th>
<th>Max Sales Done</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['manufacturing'] as $manuRow){
?>
<tr>
<td><?php echo $manuRow['products'] ?></td>
<td><?php echo $manuRow['area_of_sale'] ?></td>
<td><div><?php echo $manuRow['sales_done'] ?></div>
<?php if(array_key_exists('both_sales_done',$manuRow)) { ?>
<div><?php echo $manuRow['both_sales_done'] ?></div>
<?php } ?>
</td>
<td><?php echo $manuRow['max_sales_done']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- end manufacturing -->
<!-- start retail -->
<?php if(count($fetchRow['retail']) >0){ ?>
<div>
<p> The Retail Trading details are as under :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Products</th>
<th>Area of Sale</th>
<th>Sales Done</th>
<th>Max Sales Done</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['retail'] as $retailRow){
?>
<tr>
<td><?php echo $retailRow['products'] ?></td>
<td><?php echo $retailRow['area_of_sale'] ?></td>
<td><div><?php echo $retailRow['sales_done'] ?></div>
<?php if(array_key_exists('both_sales_done',$retailRow)) { ?>
<div><?php echo $retailRow['both_sales_done'] ?></div>
<?php } ?>
</td>
<td><?php echo $retailRow['max_sales_done']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- end retail -->
<!-- start serviceprovider -->
<?php if(count($fetchRow['serviceprovider']) >0){ ?>
<div>
<p> The Service Provider details are as under :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Services</th>
<th>Area of Sale</th>
<th>Services At</th>
<th>Max Revenue From</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['serviceprovider'] as $serviceproviderRow){
?>
<tr>
<td><?php echo $serviceproviderRow['products'] ?></td>
<td><?php echo $serviceproviderRow['area_of_sale'] ?></td>
<td><div><?php echo $serviceproviderRow['sales_done'] ?></div>
<?php if(array_key_exists('both_sales_done',$serviceproviderRow)) { ?>
<div><?php echo $serviceproviderRow['both_sales_done'] ?></div>
<?php } ?>
</td>
<td><?php echo $serviceproviderRow['max_sales_done']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- end wholesale -->
<!-- serviceprovider start wholesale -->
<?php if(count($fetchRow['wholesale']) >0){ ?>
<div>
<p> The Wholesale Trading details are as under :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Products</th>
<th>Area of Sale</th>
<th>Sales Done</th>
<th>Max Sales Done</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['wholesale'] as $wholesaleRow){
?>
<tr>
<td><?php echo $wholesaleRow['products'] ?></td>
<td><?php echo $wholesaleRow['area_of_sale'] ?></td>
<td><div><?php echo $wholesaleRow['sales_done'] ?></div>
<?php if(array_key_exists('both_sales_done',$wholesaleRow)) { ?>
<div><?php echo $wholesaleRow['both_sales_done'] ?></div>
<?php } ?>
</td>
<td><?php echo $wholesaleRow['max_sales_done']?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- end wholesale -->
<!-- start other activity-->
<?php if(count($fetchRow['otheractivity']) >0){ ?>
<div>
<p> Other activity details are as under :</p>
</div>
<table class="table2">
<thead>
<tr>
<th>Other Business Activity</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['otheractivity'] as $otherRow){
?>
<tr>
<td><?php echo $otherRow['products'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- end other avtivity -->
<!-- start this is business peak details -->
<?php if(array_key_exists('business_peak_details',$fetchRow)){ ?>
<div><p><?php echo $fetchRow['business_peak_details'];?></p></div>
<?php } ?>
<!-- end business peak period details -->
<!-- start company employee details -->
<p><?php echo $fetchRow['company_empployees'];?></p>
<p><?php echo $fetchRow['officer_visit_company_empployees'];?></p>
<!-- end company employee details -->
<!-- start documents details -->
<?php if(count($fetchRow['visit_documents'])){ ?>
<p>The below documents were sighted during the visit :</p>
<ol>
<?php foreach($fetchRow['visit_documents'] as $dValue) { ?>
<li><?php echo $dValue; ?></li>
<?php }?>
</ol>
<?php } ?>
<!-- end documents details -->
<?php } ?>
<!-- business section end -->
<!--start business financial -->
<?php
$businessFinancialResult=array();
foreach($pd_processed_forms[14] as $rowKey=> $baRow) {
$businessFinancialRow = json_decode($baRow['processed_json'],true);
// statement
if(strtoupper($businessFinancialRow['is_financial_statements'])=='YES' && count($businessFinancialRow['date_per_financial'])>0){
$bindBusinessFinancial["company_name"] =MYUITIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
$bindBusinessFinancial["company_name"] .= count($businessFinancialRow['date_per_financial'])>1 ? ' provided with last '.count($businessFinancialRow['date_per_financial']).' years of financial statements and the snapshot is as below :' : ' we were provided with last '.count($businessFinancialRow['date_per_financial']).' year of financial statements and the snapshot is as below :';
$bindBusinessFinancial['statements']=FINANCIALFORM::getBusinessFinancialDetails($businessFinancialRow['date_per_financial']);
}
else {
$bindBusinessFinancial["company_name"] =MYUITIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
$bindBusinessFinancial["company_name"] .=' not provided the financial statements :';
$bindBusinessFinancial['statements']=array();
}
// customer
if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])==0){
$bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0){
$bindBusinessFinancial["financial_customer"] ="As per customers, the financials are as below :";
$bindBusinessFinancial['customer_statements']=FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['estimated_value']);
$bindBusinessFinancial['customer_statements_header']=FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['estimated_value']);
}
else {
$bindBusinessFinancial["financial_customer"] ="As per customers, the financials are same as financial statement.";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
}
array_push($businessFinancialResult,$bindBusinessFinancial);
}
?>
<h3>Financial Information</h3>
<?php if(count($businessFinancialResult)>0){ ?>
<?php foreach($businessFinancialResult as $iterateFinance){ ?>
<p><?php echo $iterateFinance['company_name']; ?></p>
<?php if(count($iterateFinance['statements'])>0){ ?>
<table class="table2">
<thead>
<tr>
<th>Year</th>
<th>Sales</th>
<th>Net Profit</th>
<th>Net Profit to Sales %</th>
<th>Net Loss</th>
<th>Net Loss to Sales %</th>
<th>% Variation in PY Sales</th>
<th>% Variation in PY Profit</th>
</tr>
</thead>
<tbody>
<?php foreach($iterateFinance['statements'] as $bfRow){
?>
<tr>
<td><?php echo $bfRow['financial_year'] ?></td>
<td><?php echo $bfRow['financial_annual_sale'] ?></td>
<td><?php echo $bfRow['financial_net_profit'] ?></td>
<td><?php echo $bfRow['financial_margin_of_profit'] ?></td>
<td><?php echo $bfRow['financial_net_loss'] ?></td>
<td><?php echo $bfRow['financial_margin_of_loss'] ?></td>
<td><?php echo $bfRow['sale_variation'] ?></td>
<td><?php echo $bfRow['profit_variation'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- customer finance statements-->
<p><?php echo $iterateFinance['financial_customer']; ?></p>
<?php if(count($iterateFinance['customer_statements'])>0){ ?>
<table class="table2">
<thead>
<tr>
<?php foreach($iterateFinance['customer_statements_header'] as $heRow){ ?>
<th><?php echo $heRow; ?></th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php foreach($iterateFinance['customer_statements'] as $csRow){
?>
<tr>
<td>
<div><?php echo $csRow['estimate_sales_average'] ?></div>
<div><?php echo $csRow['estimate_sales_from_to'] ?></div>
</td>
<td>
<div><?php echo $csRow['estimate_net_margin'] ?></div>
<div><?php echo $csRow['estimate_net_margin_from_to']; ?></div>
</td>
<td>
<div><?php echo $csRow['estimate_net_margin_range'] ?></div>
<div><?php echo $csRow['estimate_net_margin_range_from_to']; ?></div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php } ?>
<?php }
else {?>
<p>Financial information is not available.</p>
<?php } ?>
<!--end business financial -->
<!-- client section start -->
<?php
$clientResult=array();
// this is for manufacturing
foreach($pd_processed_forms[2] as $rowKey=> $cRow) {
$clientRow = json_decode($cRow['processed_json'],true);
$bindEachResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
$getmanufacturing = array();
$getTrading=array();
$getService=array();
$getTotalPaymentsPercentonCredit=array();
if(array_key_exists('manufacturing_details',$clientRow)){
foreach($clientRow['manufacturing_details'] as $manuRow){
if(isset($manuRow['main_raw_materials'])){
$getmanufacturing = array_map(function($tag) {
return array(
'product' => $tag['manufacturing_product_name'],
'client_name' => $tag['manufacturing_client_name'],
'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
'contact_person_name' => $tag['manufacturing_contact_person_name'],
'contact_person_mobile_number' => $tag['manufacturing_contact_person_mobile_number'],
'payment_type_master' => array_key_exists('manufacturing_payment_type_master',$tag) ? $tag['manufacturing_payment_type_master'] : '',
);
}, $manuRow['main_raw_materials']);
array_push($getTotalPaymentsPercentonCredit,$manuRow['main_raw_materials_total_payments_percent_on_credit']);
}
}
}
// this is for trading
if(array_key_exists('trade_details',$clientRow)){
foreach($clientRow['trade_details'] as $tradeRow){
if(isset($tradeRow['trading_products'])){
$getTrading = array_map(function($tag) {
return array(
'product' => $tag['trade_product_name'],
'client_name' => $tag['trade_client_name'],
'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
'contact_person_name' => $tag['trade_product_contact_person_name'],
'contact_person_mobile_number' => $tag['trade_product_contact_person_mobile_number'],
'payment_type_master' => array_key_exists('trade_product_payment_type_master',$tag) ? $tag['trade_product_payment_type_master'] :'',
);
}, $tradeRow['trading_products']);
array_push($getTotalPaymentsPercentonCredit,$tradeRow['trading_products_total_payments_percent_on_credit']);
}
}
}
//this is for service
if(array_key_exists('service_provider_details',$clientRow)){
foreach($clientRow['service_provider_details'] as $serviceRow){
if(isset($serviceRow['service_products'])){
$getService = array_map(function($tag) {
return array(
'product' => $tag['service_provider_product_name'],
'client_name' => $tag['service_provider_client_name'],
'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
'contact_person_name' => $tag['service_provider_product_contact_person_name'],
'contact_person_mobile_number' => $tag['service_provider_product_contact_person_mobile_number'],
'payment_type_master' => array_key_exists('service_provider_product_payment_type_master',$tag) ? $tag['service_provider_product_payment_type_master'] :'',
);
}, $serviceRow['service_products']);
array_push($getTotalPaymentsPercentonCredit,$serviceRow['service_products_total_payments_percent_on_credit']);
}
}
}
$bindEachResult["details"]=array_merge($getmanufacturing,$getTrading,$getService);
$bindEachResult['total_payments_percent_on_credit'] = $getTotalPaymentsPercentonCredit;
array_push($clientResult,$bindEachResult);
}
?>
<h3>Client Details</h3>
<?php
foreach($clientResult as $fetchRow){
?>
<table class="table2">
<caption><?php echo $fetchRow['company_name'];?></caption>
<thead>
<tr>
<th>Product/Service</th>
<th>Client</th>
<th>Contact</th>
<th>Payment</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['details'] as $productRow){
?>
<tr>
<td><?php echo $productRow['product'] ?></td>
<td><?php echo $productRow['client_name'] ?></td>
<td><div><?php echo $productRow['person_title_name']. $productRow['contact_person_name']?></div>
<div><?php echo $productRow['person_designation']?></div>
<div><?php echo $productRow['contact_person_mobile_number']?></div>
</td>
<td><?php echo $productRow['payment_type_master'] ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<?php foreach($fetchRow['total_payments_percent_on_credit'] as $creditRow){ ?>
<tr>
<td colspan="4"><?php echo 'Approximately '.$creditRow.'%'.' of the business is running on credit to customers.' ?></td>
</tr>
<?php } ?>
</tfoot>
</table>
<?php } ?>
<!-- client section end -->
<!-- supplier section start -->
<?php
$supplierResult=array();
// this is for manufacturing
foreach($pd_processed_forms[1] as $rowKey=> $row) {
$clientRow = json_decode($row['processed_json'],true);
$bindEachResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
$getmanufacturing = array();
$getTrading=array();
$getTotalPaymentsPercentonCredit=array();
foreach($clientRow['manufacturing_details'] as $manuRow){
if(isset($manuRow['main_raw_materials'])){
$getmanufacturing = array_map(function($tag) {
return array(
'product' => $tag['manufacturing_raw_material_name'],
'supplier_name' => $tag['manufacturing_supplier_name'],
'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
'contact_person_name' => $tag['manufacturing_contact_person_name'],
'contact_person_mobile_number' => $tag['manufacturing_contact_person_mobile_number'],
'payment_type_master' => $tag['manufacturing_payment_type_master'],
);
}, $manuRow['main_raw_materials']);
array_push($getTotalPaymentsPercentonCredit,$manuRow['main_raw_materials_total_payments_percent_on_credit']);
}
}
// this is for trading
foreach($clientRow['trade_details'] as $tradeRow){
if(isset($tradeRow['trading_products'])){
$getTrading = array_map(function($tag) {
return array(
'product' => $tag['trade_product_name'],
'supplier_name' => $tag['trade_supplier_name'],
'person_title_name' => array_key_exists('person_title_name_master',$tag) ? $tag['person_title_name_master'] : '',
'person_designation' => ($tag['person_designation']==1) ? $tag['other_person_designation'] : ($tag['person_designation']>1 ? $tag['person_designation_master']: ''),
'contact_person_name' => $tag['trade_product_contact_person_name'],
'contact_person_mobile_number' => $tag['trade_product_contact_person_mobile_number'],
'payment_type_master' => array_key_exists('trade_product_payment_type_master',$tag) ? $tag['trade_product_payment_type_master'] :'',
);
}, $tradeRow['trading_products']);
array_push($getTotalPaymentsPercentonCredit,$tradeRow['trading_products_total_payments_percent_on_credit']);
}
}
$bindEachResult["details"]=array_merge($getmanufacturing,$getTrading);
$bindEachResult['total_payments_percent_on_credit'] = $getTotalPaymentsPercentonCredit;
array_push($supplierResult,$bindEachResult);
}
?>
<h3>Supplier Details</h3>
<?php
foreach($supplierResult as $fetchRow){
?>
<table class="table2">
<caption><?php echo $fetchRow['company_name']; ?></caption>
<thead>
<tr>
<th>Raw Material/Trading</th>
<th>Supplier</th>
<th>Contact</th>
<th>Payment</th>
</tr>
</thead>
<tbody>
<?php foreach($fetchRow['details'] as $productRow){
?>
<tr>
<td><?php echo $productRow['product'] ?></td>
<td><?php echo $productRow['supplier_name'] ?></td>
<td><div><?php echo $productRow['person_title_name']. $productRow['contact_person_name']?></div>
<div><?php echo $productRow['person_designation']?></div>
<div><?php echo $productRow['contact_person_mobile_number']?></div>
</td>
<td><?php echo $productRow['payment_type_master'] ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<?php foreach($fetchRow['total_payments_percent_on_credit'] as $creditRow){ ?>
<tr>
<td colspan="4"><?php echo 'Approximately '.$creditRow.'%'.' of the business is running on credit to customers.' ?></td>
</tr>
<?php } ?>
</tfoot>
</table>
<?php } ?>
<!-- supplier section end -->
<!-- start stock section -->
<?php
$stockResult=array();
foreach($pd_processed_forms[11] as $browKey=> $stRow) {
$stockRow = json_decode($stRow['processed_json'],true);
$bindStockResult["company_name"]=MYUITIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details
if(count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) > 0 || count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0){
$bindStockResult["manufacturing"]=Stockform::getStockManufacturingDetails($stockRow['manufacturing_details'][0]['manufacturing_raw_materials'], $stockRow['manufacturing_details'][0]['manufacturing_finished_goods']);
}
else {
$bindStockResult["manufacturing"]=array();
}
// this is for stock retail details
if(count($stockRow['retail_details'][0]['retail_traded_goods']) > 0){
$bindStockResult["retail"]=Stockform::getStockRetailDetails($stockRow['retail_details'][0]['retail_traded_goods']);
}
else {
$bindStockResult["retail"]=array();
}
// this is for stock whole sale details
if(count($stockRow['trade_details'][0]['trading_traded_goods']) > 0){
$bindStockResult["wholesale"]=Stockform::getStockWholesaleDetails($stockRow['trade_details'][0]['trading_traded_goods']);
}
else {
$bindStockResult["wholesale"]=array();
}
array_push($stockResult,$bindStockResult);
}
?>
<h3>Stock Details</h3>
<?php if(count($stockResult)>0){ ?>
<?php foreach($stockResult as $getstRow) { ?>
<h3><?php echo $getstRow['company_name']; ?></h3>
<!-- manufacturing -->
<?php if(count($getstRow['manufacturing'])>0) { ?>
<p>The Manufacturing stock details are as under :</p>
<table class="table2">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Qty</th>
<th>UOM</th>
<th>Value</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<?php foreach($getstRow['manufacturing'] as $pstRow){
?>
<tr>
<td><?php echo $pstRow['type'] ?></td>
<td><?php echo $pstRow['name'] ?></td>
<td><?php echo $pstRow['quantity'] ?></td>
<td><?php echo $pstRow['uom'] ?></td>
<td><?php echo $pstRow['value'] ?></td>
<td><?php echo $pstRow['is_sufficiant'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- Retail -->
<?php if(count($getstRow['retail'])>0) { ?>
<p>The Retail trading stock details are as under :</p>
<table class="table2">
<thead>
<tr>
<th>Name</th>
<th>Qty</th>
<th>UOM</th>
<th>Value</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<?php foreach($getstRow['retail'] as $reRow){
?>
<tr>
<td><?php echo $reRow['name'] ?></td>
<td><?php echo $reRow['quantity'] ?></td>
<td><?php echo $reRow['uom'] ?></td>
<td><?php echo $reRow['value'] ?></td>
<td><?php echo $reRow['is_sufficiant'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- wholesale -->
<?php if(count($getstRow['wholesale'])>0) { ?>
<p>The Wholesale trading stock details are as under :</p>
<table class="table2">
<thead>
<tr>
<th>Name</th>
<th>Qty</th>
<th>UOM</th>
<th>Value</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<?php foreach($getstRow['wholesale'] as $wsRow){
?>
<tr>
<td><?php echo $wsRow['name'] ?></td>
<td><?php echo $wsRow['quantity'] ?></td>
<td><?php echo $wsRow['uom'] ?></td>
<td><?php echo $wsRow['value'] ?></td>
<td><?php echo $wsRow['is_sufficiant'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php } ?>
<?php }
else {?>
<p> Stock details is not available.</p>
<?php } ?>
<!-- end stock section -->
<!-- start business asset -->
<?php
$businessAssetResult=array();
foreach($pd_processed_forms[22] as $rowKey=> $baRow) {
$businessAssetRow = json_decode($baRow['processed_json'],true);
$bindBusinessAsset["company_name"] ='Assets used for ';
$bindBusinessAsset["company_name"] .=MYUITIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
$bindBusinessAsset["company_name"] .=' Business :';
if(count($businessAssetRow['business_assets_details'])>0){
$bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']);
}
array_push($businessAssetResult,$bindBusinessAsset);
}
?>
<h3>Asset Details</h3>
<?php if(count($businessAssetResult)>0){ ?>
<?php foreach($businessAssetResult as $iterateAsset){ ?>
<p><?php echo $iterateAsset['company_name']; ?></p>
<table class="table2">
<thead>
<tr>
<th>Asset</th>
<th>Owned By</th>
<th>Details</th>
<th>Market Value</th>
</tr>
</thead>
<tbody>
<?php foreach($iterateAsset['details'] as $baRow){
?>
<tr>
<td><?php echo $baRow['business_assets_mode'] ?></td>
<td><?php echo $baRow['business_name_of_the_owner'] ?></td>
<td><?php echo $baRow['about_business_assets'] ?></td>
<td><?php echo $baRow['business_approximate_market_value'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<?php }
else {?>
<p>Business asset is not available.</p>
<?php } ?>
<!-- end business asset -->
<!-- start other asset section -->
<?php
$otherAssetResult=array();
foreach($pd_processed_forms[4] as $rowKey=> $oaRow) {
$otherAssetRow = json_decode($oaRow['processed_json'],true);
if(count($otherAssetRow['assets_details'])>0){
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
}
}
?>
<h3>Personal Assets</h3>
<?php if(count($otherAssetResult)>0){ ?>
<table class="table2">
<thead>
<tr>
<th>Asset</th>
<th>Owned By</th>
<th>Details</th>
<th>Market Value</th>
</tr>
</thead>
<tbody>
<?php foreach($otherAssetResult as $paRow){
?>
<tr>
<td><?php echo $paRow['assets_mode'] ?></td>
<td><?php echo $paRow['name_of_the_owner'] ?></td>
<td><?php echo $paRow['about_assets'] ?></td>
<td><?php echo $paRow['approximate_market_value'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<p>Personal asset is not available.</p>
<?php } ?>
<!-- end other asset section -->
<!-- start other income section -->
<?php
$otherIncomeResult=array();
foreach($pd_processed_forms[9] as $rowKey=> $iRow) {
$otherIcomeRow = json_decode($iRow['processed_json'],true);
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
}
}
?>
<h3>Other Income Details</h3>
<?php if(count($otherIncomeResult)>0){ ?>
<p>The below mentioned other source of income were shared :</p>
<table class="table2">
<thead>
<tr>
<th>Income Type</th>
<th>Amount</th>
<th>Frequency</th>
</tr>
</thead>
<tbody>
<?php foreach($otherIncomeResult as $oiRow){
?>
<tr>
<td><?php echo $oiRow['source'] ?></td>
<td><?php echo $oiRow['amount'] ?></td>
<td><?php echo $oiRow['frequency'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<p>Other source of income is not available.</p>
<?php } ?>
<!-- end other income section -->
<!-- start business / individual banking section -->
<?php
$bankingResult=array();
// individual banking
foreach($pd_processed_forms[7] as $rowKey=> $ibRow) {
$individualBankRow = json_decode($ibRow['processed_json'],true);
if(count($individualBankRow['banking_details'])>0){
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
}
}
// business banking
foreach($pd_processed_forms[21] as $rowKey=> $bbRow) {
$businessBankRow = json_decode($bbRow['processed_json'],true);
if(count($businessBankRow['banking_details'])>0){
$getEachValues=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getEachValues);
}
}
?>
<h3>Banking Details</h3>
<?php if(count($bankingResult)>0){ ?>
<p>Below bank account details were shared :</p>
<table class="table2">
<thead>
<tr>
<th>Account Name</th>
<th>Bank Name</th>
<th>Account Type</th>
<th>Main Business Account</th>
<th>OD / CC Limit</th>
<th>Vintage</th>
</tr>
</thead>
<tbody>
<?php foreach($bankingResult as $bdRow){
?>
<tr>
<td><?php echo $bdRow['account_name'] ?></td>
<td><?php echo $bdRow['bank_name'] ?></td>
<td><?php echo $bdRow['account_type'] ?></td>
<td><?php echo $bdRow['main_business'] ?></td>
<td><?php echo $bdRow['od_cc_limit'] ?></td>
<td><?php echo $bdRow['vintage'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<p>Bank account details is not available.</p>
<?php } ?>
<!-- end business / individual banking section -->
<!-- start Existing Loan obligations section -->
<?php
$existLoanResult=array();
foreach($pd_processed_forms[8] as $rowKey=> $elRow) {
$otherLoanRow = json_decode($elRow['processed_json'],true);
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
}
}
?>
<h3>Other Financial Information</h3>
<?php if(count($existLoanResult)>0){ ?>
<p>The below current loan obligations were shared :</p>
<table class="table2">
<thead>
<tr>
<th>Loan Type</th>
<th>Amount</th>
<th>Loan Taken From</th>
<th>Installment</th>
<th>
<div>Tenure</div>
<div>(Original - Current = Elapsed)</div>
</th>
<th>Loan taken by</th>
</tr>
</thead>
<tbody>
<?php foreach($existLoanResult as $elRow){
?>
<tr>
<td><?php echo $elRow['loan_type'] ?></td>
<td><?php echo $elRow['loan_amount'] ?></td>
<td><?php echo $elRow['lender'] ?></td>
<td><?php echo $elRow['emi'] ?></td>
<td>
<?php echo $elRow['original_tenure'].' - '.$elRow['current_balance_tenure'].' = '. $elRow['elapsed_tenure']?> </div>
</td>
<td><?php echo $elRow['loan_taken_by'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<p>Current loan obligations is not available.</p>
<?php } ?>
<!-- end Existing Loan obligations section -->
<!-- start family section -->
<?php
$familyResult=array();
foreach($pd_processed_forms[6] as $rowKey=> $fRow) {
$familyRow = json_decode($fRow['processed_json'],true);
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
}
}
?>
<h3>Other Family Details</h3>
<?php if(count($familyResult)>0){ ?>
<?php foreach($familyResult as $fmKey=>$fmValue) { ?>
<p><strong><?php echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p>
<table class="table2">
<tbody>
<tr>
<td>Address of Residence</td>
<td><?php echo $fmValue['residency_address'] ?></td>
</tr>
<tr>
<td>No.of Years Residing here</td>
<td><?php echo $fmValue['residence_No_of_years'] ?></td>
</tr>
<tr>
<td>Ownership</td>
<td><?php echo $fmValue['residence_ownership'] ?></td>
</tr>
<tr>
<td>No.of Family Members</td>
<td><?php echo $fmValue['no_family_members'] ?></td>
</tr>
</tbody>
</table>
<p>Family of <?php echo $fmValue['selected_person']." :";?></p>
<table class="table2">
<thead>
<tr>
<th>Name</th>
<th>Relation</th>
<th>Age</th>
<th>Earning Status</th>
</tr>
</thead>
<tbody>
<?php foreach($fmValue['family_members_details'] as $fmRow){
?>
<tr>
<td><?php echo $fmRow['name'] ?></td>
<td><?php echo $fmRow['family_member_relationship'] ?></td>
<td><?php echo $fmRow['family_member_age'] ?></td>
<td><?php echo $fmRow['family_member_earning'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }?>
<?php }
else{?>
<p>Other Family Members is not available.</p>
<?php }?>
<!-- end family section -->
<!-- start neighbourhood/reference check -->
<?php
$existNeighRefCheck=array();
foreach($pd_processed_forms[19] as $rowKey=> $nrcRow) {
$neighbourRefRow = json_decode($nrcRow['processed_json'],true);
if(strtoupper($neighbourRefRow['check_type'])==0 && count($neighbourRefRow['neighbourhood_list'])>0){
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($neighbourRefRow['neighbourhood_list'],$pd_master_details[0]);
}
else if(strtoupper($neighbourRefRow['check_type'])==1 && count($neighbourRefRow['referencecheck_list'])>0){
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
}
}
?>
<h3>Neighbourhood / Reference Check</h3>
<?php if(count($existNeighRefCheck)>0){ ?>
<ol>
<?php foreach($existNeighRefCheck as $nfValue) { ?>
<li style="margin: 15px 0;"><?php echo $nfValue; ?></li>
<?php }?>
</ol>
<?php }
else{?>
<p>Neighbourhood / Reference Check is not available.</p>
<?php }?>
<!-- end neighbourhood/reference check -->
</body>
</html>