SMC CREDIT PD REPORT
This commit is contained in:
parent
7fe94fba3d
commit
ccff530c89
@ -1431,11 +1431,49 @@ public function filterSalesPDList_post() {
|
||||
public function smcCreditPDReport_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
print_r($records);
|
||||
$this->load->helper('smc_creditpd');
|
||||
// print_r($records);
|
||||
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$pd_section_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_pd_id' => $records['pd_id']),SMC_CREDIT_PD_SECTION_DATA);
|
||||
echo count($pd_section_data);
|
||||
$view_data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$view_data['applicant_details'] = $this->PD_Model->getApplicantsDetails($records['pd_id']);
|
||||
$pd_section_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_pd_id' => $records['pd_id']),SMC_CREDIT_PD_SECTION_DATA,array(),'','fk_form_id','ASC');
|
||||
// print_r ($view_data['pd_master_details']);die();
|
||||
|
||||
if(count($pd_section_data))
|
||||
{
|
||||
foreach ($pd_section_data as $key => $value)
|
||||
{
|
||||
$value['json'] = smc_creditpd::getSMCCreditPDReportContent($value);
|
||||
$view_data['pd_section_data'][$value['fk_form_id']] = $value['json'];
|
||||
//die();
|
||||
}
|
||||
}
|
||||
// print_r($view_data['pd_section_data'][11]);die();
|
||||
|
||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||
// echo $html_content;die();
|
||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file = $this->external_path ."/pd_reports/" . $records['pd_id'] . "/temp.pdf";
|
||||
$bytes = file_put_contents($output_file, $pdf_doc);
|
||||
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.(ENVIRONMENT == 'production' ? 7 : 35);
|
||||
$key = 'pd'.$records['pd_id'].'/pd_reports/'.$pdf_name.'.pdf';
|
||||
$bucket_data = array('bucket_name'=>$bucket_name,'key'=>$key,'sourcefile'=>$output_file);
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
|
||||
// $this->Sales_PD_Model->updateRecords(array('is_pdf' => 1, 'is_edited' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id));
|
||||
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $singed_uri;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
138
api/application/helpers/smc_creditpd_helper.php
Normal file
138
api/application/helpers/smc_creditpd_helper.php
Normal file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
class smc_creditpd
|
||||
{
|
||||
|
||||
public static function getSMCCreditPDReportContent($section)//1 = Di, 2 = SAL
|
||||
{
|
||||
// $CI =&get_instance();
|
||||
// $CI->load->model('PD_Model');
|
||||
$return_data =array();
|
||||
switch($section['fk_form_id'])
|
||||
{
|
||||
case 1://borrower
|
||||
$return_data = SELF::getBorrowerSectionData($section);
|
||||
break;
|
||||
|
||||
case 2://address
|
||||
case 3://fund
|
||||
case 4://General Business
|
||||
case 5://Key Stakeholders
|
||||
case 6://bbusiness brief
|
||||
case 7://emp strength
|
||||
case 10://finance
|
||||
|
||||
case 12://client
|
||||
case 16://other family
|
||||
$return_data = json_decode($section['json'],true);
|
||||
break;
|
||||
case 8://assest
|
||||
$return_data = SELF::getAssestSectionData($section);
|
||||
break;
|
||||
|
||||
// case 11://supplier
|
||||
// $return_data = SELF::getSupplierSectionData($section);
|
||||
// break;
|
||||
|
||||
}
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
|
||||
static function getBorrowerSectionData($section)
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
foreach ($json['borrower_details'] as $key => $value)
|
||||
{
|
||||
if(!strcasecmp($value['borrower_met'],'yes'))
|
||||
{
|
||||
$json['person_met'] = $value['borrower_name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!isset($json['person_met']))
|
||||
{
|
||||
$json['person_met'] = 'No One Met';
|
||||
}
|
||||
return $json;
|
||||
}
|
||||
|
||||
static function getAssestSectionData($section)
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
// $CI =&get_instance();
|
||||
// $CI->load->model('PD_Model');
|
||||
|
||||
$applicant_details = applicantname_grabber::getLatestApplicantsName($section['fk_pd_id']);
|
||||
$asset_type = array('2' => 'Property','3' => 'Vehicle','4' => 'Equipments and machinery','5' => 'Jewellery','6' => 'Life Insurance Policy','7' => 'Investments','1' => 'Others');
|
||||
// print_r($applicant_details);die();
|
||||
|
||||
$header_row = '<tr>'.'<th> Particulars </th>';
|
||||
$first_row = '<tr>'.'<td> Asset Type </td>';
|
||||
$second_row = '<tr>'.'<td> Asset Description </td>';
|
||||
$third_row = '<tr>'.'<td> Asset Ownership (Owned / Rented) </td>';
|
||||
$fourth_row = '<tr>'.'<td> If Owned then Owner Name </td>';
|
||||
$five_row = '<tr>'.'<td> If Owned then Market Value </td>';
|
||||
$siz_row = '<tr>'.'<td> Age of the Asset (Years) </td>';
|
||||
$seven_row = '<tr>'.'<td> Is there a Loan Against the Asset? (Yes / No) </td>';
|
||||
foreach ($json['business_assets_details'] as $key => $value)
|
||||
{
|
||||
$header_row .= '<th> Assest '. ( $key + 1 ).'</th>';
|
||||
$first_row .= '<td style="text-align:center;">'. $asset_type [ $value['business_assets_mode'] ].'</td>';
|
||||
$second_row .= '<td style="text-align:center;">'. $value['other_asset_description'] .'</td>';
|
||||
$third_row .= '<td style="text-align:center;"> '. $value['business_ownership_type'] .' </td>';
|
||||
$business_name_of_the_owner = (isset($value['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($value['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
$fourth_row .= '<td style="text-align:center;"> '. $business_name_of_the_owner .' </td>';
|
||||
$five_row .= '<td style="text-align:center;"> '. (isset($value['business_approximate_market_value']) ? $value['business_approximate_market_value'] : 'NA') .' </td>';
|
||||
$siz_row .= '<td style="text-align:center;"> '. (isset($value['business_purchase_year']) ? $value['business_purchase_year'] : 'NA') .' </td>';
|
||||
$seven_row .= '<td style="text-align:center;"> '. (isset($value['business_emi']) ? $value['business_emi'] : 'NA') .' </td>';
|
||||
}
|
||||
$header_row .= '</tr>';
|
||||
$first_row .= '</tr>';
|
||||
$second_row .= '</tr>';
|
||||
$third_row .= '</tr>';
|
||||
$fourth_row .= '</tr>';
|
||||
$five_row .= '</tr>';
|
||||
$siz_row .= '</tr>';
|
||||
|
||||
$json['display_data'] = array('header_row' => $header_row,'first_row' => $first_row,'second_row' => $second_row,'third_row' => $third_row,'fourth_row' => $fourth_row,'five_row' => $five_row,'siz_row' => $siz_row,'seven_row' => $seven_row);
|
||||
return $json;
|
||||
}
|
||||
|
||||
static function getSupplierSectionData($section)
|
||||
{
|
||||
$json = json_decode($section['json'],true);
|
||||
$header_row = '<tr>'.'<th> Particulars </th>';
|
||||
$first_row = '<tr>'.'<td> Item Purchased </td>';
|
||||
$second_row = '<tr>'.'<td> Contact Person </td>';
|
||||
$third_row = '<tr>'.'<td> Mobile Number </td>';
|
||||
$fourth_row = '<tr>'.'<td> Landline No </td>';
|
||||
$five_row = '<tr>'.'<td> Payment Terms </td>';
|
||||
$siz_row = '<tr>'.'<td> Payment Mode </td>';
|
||||
$seven_row = '<tr>'.'<td> No of days credit </td>';
|
||||
foreach ($json['business_assets_details'] as $key => $value)
|
||||
{
|
||||
$header_row .= '<th>'.$value['supplier_name'].'</th>';
|
||||
$first_row .= '<td style="text-align:center;">'. $value['provider_name'] .'</td>';
|
||||
$second_row .= '<td style="text-align:center;">'. $value['contact_person_name'] .'</td>';
|
||||
$third_row .= '<td style="text-align:center;"> '. $value['business_ownership_type'] .' </td>';
|
||||
$business_name_of_the_owner = (isset($value['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($value['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
$fourth_row .= '<td style="text-align:center;"> '. $value['contact_person_mobile_no'] .' </td>';
|
||||
$five_row .= '<td style="text-align:center;"> '. (isset($value['person_landline']) ? $value['person_landline'] : 'NA') .' </td>';
|
||||
$siz_row .= '<td style="text-align:center;"> '. (isset($value['payment_type']) ? $value['payment_type'] : 'NA') .' </td>';
|
||||
$seven_row .= '<td style="text-align:center;"> '. (isset($value['payment_mode']) ? $value['payment_mode'] : 'NA') .' </td>';
|
||||
}
|
||||
$header_row .= '</tr>';
|
||||
$first_row .= '</tr>';
|
||||
$second_row .= '</tr>';
|
||||
$third_row .= '</tr>';
|
||||
$fourth_row .= '</tr>';
|
||||
$five_row .= '</tr>';
|
||||
$siz_row .= '</tr>';
|
||||
|
||||
$json['display_data'] = array('header_row' => $header_row,'first_row' => $first_row,'second_row' => $second_row,'third_row' => $third_row,'fourth_row' => $fourth_row,'five_row' => $five_row,'siz_row' => $siz_row,'seven_row' => $seven_row);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
560
api/application/views/smc_creditpd_reports/MWISE.php
Normal file
560
api/application/views/smc_creditpd_reports/MWISE.php
Normal file
@ -0,0 +1,560 @@
|
||||
<?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######### */
|
||||
|
||||
|
||||
/* #########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://www.smcfinance.com/images/logo-small.jpg'/></div>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<table class="scorecard_table">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10" >Personal Discussion Sheet - Business Loans </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 $applicant_details[0]['company_name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3"> Name of Person Met During Visit</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $pd_section_data[1]['person_met']?> </td>
|
||||
</tr>
|
||||
|
||||
<!-- <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 'Business Address'; ?></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]['state_name']?></td>
|
||||
<td>State</td>
|
||||
<td class = "tdcenteralign"><?php echo $pd_master_details[0]['city_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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Fund Requirement</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="3" ><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[3]['loan_amount'])?></td>
|
||||
<td colspan="2">Total Fund Requirement (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="2"> <?php echo $rupee_symbol.' '. MYUTIL::customIndianNumberFormat($pd_section_data[3]['end_use_fund_requirement'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Tenure (Months)</td>
|
||||
<td class = "tdcenteralign" colspan="3" ><?php echo $pd_section_data[3]['loan_tenure']?></td>
|
||||
<td colspan="2" >Loan Purpose (End-Use)</td>
|
||||
<td class = "tdcenteralign" colspan="2" ><?php echo $pd_section_data[3]['end_use']?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table class="scorecard_table" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="15">Details of Key Stakeholders in the Business</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5">Name</th>
|
||||
<th colspan="2" >Share Holding</th>
|
||||
<th colspan="2" >Year(s) in Current Business</th>
|
||||
<th colspan="2">Total Work Exp(Yrs)</th>
|
||||
<th colspan="2" >Previous Experience Details</th>
|
||||
<th colspan="2" >Started Business</th>
|
||||
</tr>
|
||||
<?php
|
||||
if(isset($pd_section_data[5]))
|
||||
{
|
||||
|
||||
foreach ($pd_section_data[5]['key_stakeholders'] as $section5_key => $section5_value)
|
||||
{
|
||||
echo '<tr><td class="tdcenteralign" colspan="5">'.$section5_value['stakeholder_name'] .'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2">'.$section5_value['share_holding'].'%</td>'.
|
||||
'<td class="tdcenteralign" colspan="2">'.$section5_value['vintage_in_current_biz'].'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2">'.$section5_value['total_work_exp'].'</td>'.
|
||||
|
||||
'<td class="tdcenteralign" colspan="2">'.( isset ($section5_value['previous_experience_details']) && $section5_value['previous_experience_details'] ? $section5_value['previous_experience_details'] : 'NA' ).'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2" style="text-align: center">'.$section5_value['started_biz'].'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
<table class="scorecard_table" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="15">Other Family Members involved in the business</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5">Name</th>
|
||||
<th colspan="3" >Relationship</th>
|
||||
<th colspan="2" >Relation to Individual Stakeholders</th>
|
||||
<th colspan="3">Relation to Company / Firm</th>
|
||||
<th colspan="2" >Started Biz (Yes / No)</th>
|
||||
<!-- <th colspan="2" >Started Business</th> -->
|
||||
</tr>
|
||||
<?php
|
||||
if(isset($pd_section_data[16]))
|
||||
{
|
||||
|
||||
foreach ($pd_section_data[16]['family_details'] as $sectio16_key => $section16_value)
|
||||
{
|
||||
echo '<tr><td class="tdcenteralign" colspan="5">'.$section16_value['member_name'] .'</td>'.
|
||||
'<td class="tdcenteralign" colspan="3">'.$section16_value['relationship'].'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2">'.$section16_value['stakeholder_relation'].'</td>'.
|
||||
'<td class="tdcenteralign" colspan="3">'.$section16_value['company_relation'].'</td>'.
|
||||
|
||||
// '<td class="tdcenteralign" colspan="2">'.( isset ($section5_value['previous_experience_details']) && $section5_value['previous_experience_details'] ? $section5_value['previous_experience_details'] : 'NA' ).'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2" style="text-align: center">'.$section5_value['started_biz'].'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody></table>
|
||||
|
||||
|
||||
<table class="scorecard_table" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Brief of the Business / Service</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3">Product/Service Name</th>
|
||||
<th colspan="2">Contribution Business Product</th>
|
||||
<th colspan="5">Business Process Brief</th>
|
||||
</tr>
|
||||
<?php
|
||||
if(isset($pd_section_data[6]))
|
||||
{
|
||||
|
||||
foreach ($pd_section_data[6]['key_products_contribution'] as $section6_key => $section6_value)
|
||||
{
|
||||
echo '<tr><td class="tdcenteralign" colspan="3">'.$section6_value['product_name'] .'</td>'.
|
||||
'<td class="tdcenteralign" colspan="2">'.$section6_value['contribution_business_product'].'%</td>'.
|
||||
'<td class="tdcenteralign" colspan="5">'.$section6_value['business_process'].'</td>'.'</tr>';
|
||||
// '<td class="tdcenteralign" colspan="2">'.$section5_value['total_work_exp'].'</td>'.
|
||||
|
||||
// '<td class="tdcenteralign" colspan="2">'.( isset ($section5_value['previous_experience_details']) && $section5_value['previous_experience_details'] ? $section5_value['previous_experience_details'] : 'NA' ).'</td>'.
|
||||
// '<td class="tdcenteralign" colspan="2" style="text-align: center">'.$section5_value['started_biz'].'</td>'.
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody></table>
|
||||
<br>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="12">Employee Strength</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" >No of Employees as per person met</td>
|
||||
<td colspan="4" >No fo Employees Sighted during the Visit</td>
|
||||
<td colspan="4" >Approx Salary Paid per month (Rs)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" >Permanent >></td>
|
||||
<td colspan="2" ><?php echo $pd_section_data[7]['permanant_employees_person_met'];?></td>
|
||||
<td colspan="2" >Permanent >></td>
|
||||
<td colspan="2" ><?php echo $pd_section_data[7]['permanant_employees_cm'];?></td><td colspan="2" >Permanent >></td>
|
||||
<td colspan="2" ><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[7]['permanant_employees_salary']);?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" >Temporary >></td>
|
||||
<td colspan="2" ><?php echo $pd_section_data[7]['temporary_employees_person_met'];?></td>
|
||||
<td colspan="2" >Temporary >></td>
|
||||
<td colspan="2" ><?php echo $pd_section_data[7]['temporary_employees_cm'];?></td><td colspan="2" >Temporary >></td>
|
||||
<td colspan="2" ><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[7]['temporary_employees_salary']);?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="16">Seasonality of the Business</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" >Business Seasonal (Yes / No)</td>
|
||||
<td colspan="4" ><?php echo $pd_section_data[4]['seasonality'] ?></td>
|
||||
<td colspan="4" >If Seasonal Please mention the Lean Months</td>
|
||||
<td colspan="4" ><?php echo $pd_section_data[4]['low_sale_month'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" >Reason</td>
|
||||
<td colspan="12" ><?php echo $pd_section_data[4]['low_sale_month_reason'] ?></td>
|
||||
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="scorecard_table">
|
||||
<tr><th class="thlargefont">Business Assets</th></tr>
|
||||
</table>
|
||||
<table class="scorecard_table">
|
||||
|
||||
<thead>
|
||||
|
||||
<?php echo $pd_section_data[8]['display_data']['header_row']?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echo $pd_section_data[8]['display_data']['first_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['second_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['third_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['fourth_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['five_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['siz_row']?>
|
||||
<?php echo $pd_section_data[8]['display_data']['seven_row']?>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div id="page_break"></div>
|
||||
<table class="scorecard_table">
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10" >Financial Information</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" >Name of the Company / Firm whose financials are noted </td>
|
||||
<td class = "tdcenteralign" colspan="4" ><?php echo $applicant_details[0]['company_name']?></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
<table class="scorecard_table"><tbody>
|
||||
<tr>
|
||||
<th colspan="7">Particulars of Financials as per books of Accounts</th>
|
||||
<?php
|
||||
|
||||
// $sales_pd_created_date = date('Y-m-d',strtotime($master[0]['createdon']));
|
||||
// $last_four_finyrs = MYUTIL::getFinYears($sales_pd_created_date,1);
|
||||
// $ordered_finyrs_data = MYUTIL::reOrderFinYrsData($section5,$last_four_finyrs);
|
||||
|
||||
//print_r($section5);die();
|
||||
// $totol = 0;
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
// if(is_numeric($fy_key))
|
||||
// {
|
||||
// $totol++;
|
||||
echo '<th colspan="1" >FY - '.($fy_value['fy']).'</th>';
|
||||
// }
|
||||
}
|
||||
?>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="7">Sales / Revenue (Rs) </td>
|
||||
<?php
|
||||
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
echo '<td colspan="1" class="tdcenteralign">'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($fy_value['sales_revenue'])).'</td>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" >Net Profit / (Net Loss) (Rs) </td>
|
||||
<?php
|
||||
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
echo '<td colspan="1" class="tdcenteralign">'.$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($fy_value['net_profit']).'</td>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" >Net Profit or (Net Loss) to Sales % </td>
|
||||
<?php
|
||||
|
||||
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
// echo '<td colspan="1" class="tdcenteralign">'.round((($fy_value['net_profit'] / $fy_value['sales_revenue'] ) * 100 ),2).'%</td>';
|
||||
echo '<td colspan="1" class="tdcenteralign">'.($fy_value['net_profit_sales_percent']).'</td>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" >% <?php echo '( '.$uparrow.'/'.$downarrow.' )'?> in Sales over PY </td>
|
||||
<?php
|
||||
|
||||
// $pre_year_sales = 0;
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
|
||||
// echo '<td colspan="1" class="tdcenteralign">'.($fy_value['sales_py']).'</td>';
|
||||
|
||||
if($fy_key == 0)
|
||||
{
|
||||
echo '<td colspan="1" class="tdcenteralign">NA</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// //echo $pre_year_sales;
|
||||
// $sales_over_py = round( ((($fy_value['sales_revenue'] - $pre_year_sales) / $pre_year_sales ) * 100),2);
|
||||
|
||||
$sales_over_py = $fy_value['sales_py'];
|
||||
echo '<td colspan="1"class="tdcenteralign" >'. ((($sales_over_py == 0 ) ? $dash :( $sales_over_py > 0 ? $uparrow : $downarrow))).'' . abs($sales_over_py). ' %</td>';
|
||||
|
||||
}
|
||||
// $pre_year_sales = $fy_value['sales_revenue'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" >% <?php echo '( '.$uparrow.'/'.$downarrow.' )'?> in Net Profit over PY </td>
|
||||
<?php
|
||||
|
||||
$pre_year_net_profit = 0;
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
if($fy_key == 0)
|
||||
{
|
||||
echo '<td colspan="1" class="tdcenteralign">NA</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// $net_profit_over_py = round( ((($fy_value['net_profit'] - $pre_year_net_profit) / $pre_year_net_profit ) * 100),2);
|
||||
$net_profit_over_py = $fy_value['netprofit_py'];
|
||||
echo '<td colspan="1" class="tdcenteralign">'. ((($net_profit_over_py == 0 ) ? $dash :( $net_profit_over_py > 0 ? $uparrow : $downarrow))).' ' . abs($net_profit_over_py). '% </td>';
|
||||
|
||||
}
|
||||
// $pre_year_net_profit = $fy_value['net_profit'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" >% <?php echo '( '.$uparrow.'/'.$downarrow.' )'?> in Net Profit % over PY </td>
|
||||
<?php
|
||||
|
||||
$pre_year_net_pro_loss_per = 0;
|
||||
foreach ($pd_section_data[10]['financial_info'] as $fy_key => $fy_value)
|
||||
{
|
||||
if(is_numeric($fy_key))
|
||||
{
|
||||
if($fy_key == 0)
|
||||
{
|
||||
echo '<td colspan="1" class="tdcenteralign">NA</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// $year_net_pro_loss_per_over_py = round( ((( (($fy_value['net_profit'] / $fy_value['sales_revenue'] ) * 100 ) - $pre_year_net_pro_loss_per) / $pre_year_net_pro_loss_per ) * 100),2);
|
||||
|
||||
$year_net_pro_loss_per_over_py = $fy_value['netprofit_py_percent'];
|
||||
echo '<td colspan="1" class="tdcenteralign">'. ((($year_net_pro_loss_per_over_py == 0 ) ? $dash :( $year_net_pro_loss_per_over_py > 0 ? $uparrow : $downarrow))).' ' . abs($year_net_pro_loss_per_over_py). '% </td>';
|
||||
// // echo '<td colspan="1" >'. (($year_net_pro_loss_per_over_py > 0 )? '<span style="color:green;">↑</span>' : '<span style="color:red;">↓</span>').' ( ' . $year_net_pro_loss_per_over_py. ' )</td>'; //(($fy_value['net_profit'] / $fy_value['sales_revenue'] ) * 100 )
|
||||
|
||||
}
|
||||
// $pre_year_net_pro_loss_per = (($fy_value['net_profit'] / $fy_value['sales_revenue'] ) * 100 );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<br>
|
||||
<!-- <table class="scorecard_table">
|
||||
<tr>
|
||||
<td colspan="3">Income to be Considered (Rs Per Annum) </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section5['income_considered'] )?></td>
|
||||
<td colspan="3" >Income Considered (Rs Per Mth) </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo MYUTIL::customIndianNumberFormat( round(($section5['income_considered'] / 12 ),2) );?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Income assessment Program Recommended </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $section5['income_assessment_program_recommended']?></td>
|
||||
<td colspan="3" >Fixed Obligations (Rs per month) </td>
|
||||
<td class="tdcenteralign" colspan="2"><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $section5['fixed_obligations'] )?></td>
|
||||
</tr>
|
||||
</tbody></table> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user