FlyHI report Design : ps
This commit is contained in:
parent
9e81d25666
commit
6ab786d646
@ -377,7 +377,8 @@ $route['faceMarkImage'] = 'PD_Controller/toMakeFaceBoundingBox';
|
||||
|
||||
$route['saveFlyhiPD'] = 'Flyhi_Controller/saveFlyhiPD';
|
||||
$route['listFlyhiPD'] = 'Flyhi_Controller/listFlyhiPD';
|
||||
$route['listFlyhiSalesPD'] = 'Flyhi_Controller/listFlyhiPD';
|
||||
$route['getFlyhiPD'] = 'Flyhi_Controller/getFlyhiPD';
|
||||
$route['loadFlyhiPDTemplate'] = 'Flyhi_Controller/loadFlyhiPDTemplate';
|
||||
$route['(downloadFlyhiPDReport/:any)'] = 'Flyhi_Controller/getFlyhiPDReport';
|
||||
|
||||
|
||||
|
||||
@ -11,6 +11,12 @@ class Flyhi_Controller extends REST_Controller {
|
||||
parent::__construct();
|
||||
$this->load->model('Flyhi_Model','Flyhi_Model');
|
||||
$this->load->model('Sales_PD_Model','Sales_PD_Model');
|
||||
$this->load->library('AWS_S3');
|
||||
$this->load->library('pdfgenerator');
|
||||
$this->load->helper('satellite_image');
|
||||
$this->load->helper('camunda');
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function listFlyhiPD_get(){
|
||||
@ -268,7 +274,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
$section_data = array();
|
||||
if(isset($Flyhi_pdid) || $Flyhi_pdid != "" || $Flyhi_pdid != null)
|
||||
{
|
||||
$section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $Flyhi_pdid,'isactive' => 1,'section_id' => 1),SALESPD_SECTION_DATA);
|
||||
$section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $Flyhi_pdid,'isactive' => 1,'section_id' => 1),SALESPD_SECTION_DATA);
|
||||
}
|
||||
if($section_data)
|
||||
{
|
||||
@ -285,4 +291,290 @@ class Flyhi_Controller extends REST_Controller {
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadFlyhiPDTemplate_post()
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$lender_id = $records['lender_id'];
|
||||
$sales_pd_type = $records['sales_pd_type'];
|
||||
$product = $records['product_id'];
|
||||
$pd_type = 2;
|
||||
if(isset($records['pd_type'])){ $pd_type = $records['pd_type'];}
|
||||
$template = $this->Flyhi_Model->selectCustomRecords(array('*'),array('lender_id' => $lender_id,'pd_type' => $pd_type,'sales_pd_type' => $sales_pd_type,'isactive' => 1),SALESPDTEMPLATE);
|
||||
if(is_array($template) && count($template))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $template[0];
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'No Tempate Found!';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getFlyhiPDReport_get()
|
||||
{
|
||||
$pd_id = $this->uri->segment(2);
|
||||
$this->prepareFlyhiPDReport($pd_id);
|
||||
}
|
||||
|
||||
function prepareFlyhiPDReport($pd_id,$api = true)
|
||||
{
|
||||
log_message('ERROR','####PREPARE Flyhi PD REPORT CALLED'.$pd_id);
|
||||
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','USERPROFILE.smc_emp_code');
|
||||
$table = SALES_PD_DATA.' as SALES_PD_DATA';
|
||||
$joins = array(
|
||||
array('table' => ENTITY. ' as ENTITY',
|
||||
'condition' =>'SALES_PD_DATA.lender_id = ENTITY.entity_id',
|
||||
'jointype' => 'INNER'),
|
||||
array('table' => USERPROFILE. ' as USERPROFILE',
|
||||
'condition' =>'SALES_PD_DATA.createdby = USERPROFILE.userid',
|
||||
'jointype' => 'LEFT')
|
||||
);
|
||||
|
||||
$where_condition_array = array('SALES_PD_DATA.sales_pd_id' => $pd_id);
|
||||
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array);
|
||||
$pd_type = "";
|
||||
if($sales_pd_data[0]['sales_pd_type'] == 3){$pd_type = "Office FI PD-"; }else if($sales_pd_data[0]['sales_pd_type'] == 4){$pd_type = "Residence FI PD-";}
|
||||
|
||||
if($sales_pd_data)
|
||||
{
|
||||
ini_set('max_execution_time', 0);
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$sales_pd_data[0]['lender_id'];
|
||||
// 1st Type Key name. (name,abbr and date).
|
||||
$pdf_name = strtolower(trim($sales_pd_data[0]['applicant_name']));
|
||||
$pdf_name .= '-'.$pd_type;
|
||||
$pdf_name .= '-'.(date('dmY',strtotime($sales_pd_data[0]['completed_date'])));
|
||||
$key = 'sales_pd/'.$pd_id.'/'.$pdf_name.'.pdf';
|
||||
//$this->Sales_PD_Model->updateRecords(array('pd_report_filename' => 'PD_Report-'.$pdf_name),SALES_PD_DATA,array('sales_pd_id' => $pd_id));
|
||||
|
||||
if(!file_exists($this->external_path.'/sales_pd/'.$pd_id))
|
||||
{
|
||||
mkdir($this->external_path.'/sales_pd/'.$pd_id,0777);
|
||||
}
|
||||
|
||||
if(!$sales_pd_data[0]['is_pdf'] || $sales_pd_data[0]['is_edited'])
|
||||
{
|
||||
|
||||
$all_section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC');
|
||||
// print_r(json_decode($all_section_data[0]['section_data'],true));die();
|
||||
$view_data['master'] = $sales_pd_data;
|
||||
$common_fields = array('pdid'=>$sales_pd_data[0]['sales_pd_id'],
|
||||
'caseno'=>$sales_pd_data[0]['sales_pd_sno']);
|
||||
foreach ($all_section_data as $sec_key => $section)
|
||||
{
|
||||
// print_r($section['section_id']);die();
|
||||
// log_message('ERROR','####PREPARE SALESPD REPORT CALLED'.$pd_id);
|
||||
$view_data['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);//die();
|
||||
$section_fields['section'.$section['section_id'] ] = $this->processSalesPDJSON($section);
|
||||
}
|
||||
$view_data['geo_location'] = $sales_pd_data[0]['geo_location'];
|
||||
// die();
|
||||
//$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr'];
|
||||
$view_name = $sales_pd_data[0]['short_name'];
|
||||
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
||||
// echo $html_content;die();
|
||||
$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 ."/sales_pd/" . $pd_id . "/temp.pdf";
|
||||
$bytes = file_put_contents($output_file, $pdf_doc);
|
||||
//echo $bytes;
|
||||
//die();
|
||||
$bucket_data = array('bucket_name'=>$bucket_name,'key'=>$key,'sourcefile'=>$this->external_path.'/sales_pd/'.$pd_id.'/temp.pdf');
|
||||
log_message('ERROR','####FLYHIPD REPORT UPLOAD TO S3'.$pd_id);
|
||||
$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' => $pd_id));
|
||||
if($api)
|
||||
{
|
||||
$_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
$headers = @get_headers($_uri);
|
||||
if($headers && strpos( $headers[0], '200')) {
|
||||
// $singed_uri = $_uri;
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $_uri;
|
||||
}else {
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Report URI Not Found';
|
||||
}
|
||||
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($api)
|
||||
{
|
||||
## NEW KEY BECAUSE TITLE-RENAME
|
||||
$_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
$headers = @get_headers($_uri);
|
||||
if($headers && strpos( $headers[0], '200')) {
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $_uri;
|
||||
}else {
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'Report URI Not Found';
|
||||
}
|
||||
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function processSalesPDJSON($section_array)
|
||||
{
|
||||
//
|
||||
//print_r($section_array);die();
|
||||
//echo '###'.$section_array['section_id'].'####';
|
||||
if($section_array['section_id'] == 6)
|
||||
{
|
||||
// print_r(json_decode($section_array['section_data'],true));
|
||||
// die();
|
||||
}
|
||||
if($section_array['section_id'])
|
||||
{
|
||||
//print_r($section_array);//die();
|
||||
$questions = json_decode($section_array['section_data'],true);
|
||||
return $this->processSalesPDQuestions($questions['questions'],$section_array['section_id']);
|
||||
|
||||
}
|
||||
// die();
|
||||
// $general_section_dta = array();
|
||||
// foreach ($section_array as $sec_key => $section)
|
||||
// {
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
function processSalesPDQuestions($questions,$section_id)
|
||||
{
|
||||
//print_r($questions);die();
|
||||
$temp_array = array();
|
||||
foreach ($questions as $ques_key => $question)
|
||||
{
|
||||
//if($question['section_id']){}
|
||||
if($question['is_repeatable'] == null && ($question['type'] == 1 || $question['type'] == 2 || $question['type'] == 3 || $question['type'] == 4 || $question['type'] == 6 || $question['type'] == 7 || $question['type'] == 8))//text,radio,SDD,MDD,camera,txt area, searchable dd
|
||||
{
|
||||
|
||||
$temp_array[ $question['question_key'] ] = isset($question['answer_value']) ? $question['answer_value'] : null;
|
||||
if($question['question_key'] == 'state' || $question['question_key'] == 'city' || $question['question_key'] == 'pincode' || $question['question_key'] == 'loan_purpose' || $question['question_key'] == 'constitution' || $question['question_key'] == 'about_locality' || $question['question_key'] == 'equipment_list' || $question['question_key'] == 'vendor_list' || $question['question_key'] == 'person_met_designation')
|
||||
{
|
||||
//if($question['type'] == 4) { print_r($question['answer_value']); }
|
||||
$temp_array[ $question['question_key'] ] = $this->getMasterData($question['answer_value'],$question['answers']);
|
||||
// if($question['type'] == 4) { print_r($temp_array[ $question['question_key'] ]); }
|
||||
}
|
||||
if(isset($question['subfield_key']))
|
||||
{
|
||||
|
||||
$temp_array[ $question['question_key'] ] .= $question['subfield_value'].',';
|
||||
|
||||
}
|
||||
// echo 'FIRST';print_r($temp_array[ $question['question_key'] ]);
|
||||
if(substr_count($temp_array[ $question['question_key'] ], ','))
|
||||
{
|
||||
$temp_array[ $question['question_key'] ] = substr_replace($temp_array[ $question['question_key'] ],'', strrpos($temp_array[ $question['question_key'] ],','),1);
|
||||
}
|
||||
//echo 'SECOND'; print_r($temp_array[ $question['question_key'] ]);
|
||||
if(substr_count($temp_array[ $question['question_key'] ], ','))
|
||||
{
|
||||
|
||||
$temp_array[ $question['question_key'] ] = substr_replace($temp_array[ $question['question_key'] ],' and ', strrpos($temp_array[ $question['question_key'] ],','),1);
|
||||
|
||||
}
|
||||
}
|
||||
else if($question['is_repeatable'] == 1 )
|
||||
{
|
||||
//print_r($question['questions_group']);die();
|
||||
if($section_id != 9)
|
||||
{
|
||||
foreach ($question['questions_group'] as $group_key => $group_value)
|
||||
{
|
||||
//print_r($group_value['questions']);//die();
|
||||
$group_temp = array();
|
||||
foreach ($group_value['questions'] as $q_key => $q_value)
|
||||
{
|
||||
//print_r($q_value);die();
|
||||
//echo $group_key;
|
||||
$group_temp[ $q_value['question_key'] ] = $q_value['answer_value'];
|
||||
|
||||
if(isset($q_value['subfield_key'])){ $group_temp[ $q_value['question_key'] ] = $q_value['subfield_value']; }
|
||||
//print_r($group_temp);
|
||||
}
|
||||
//print_r($group_temp);
|
||||
$temp_array[ $group_key ] = $group_temp;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "SDKJHKSJ**";
|
||||
$group_temp = array();
|
||||
foreach ($question['questions_group'] as $group_key => $group_value)
|
||||
{
|
||||
|
||||
$temp_array[ $group_value['questions'][0]['question_key'] ][] = isset($group_value['questions'][0]['subfield_key']) ? $group_value['questions'][0]['subfield_value'] : $group_value['questions'][0]['answer_value'];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// //print_r($temp_array);die();
|
||||
// if($section_id == 2)
|
||||
// {
|
||||
// //print_r(json_decode($section_array['section_data'],true)); die();
|
||||
// die();
|
||||
// }
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
function getMasterData($id,$array)
|
||||
{
|
||||
|
||||
// print_r($id);echo '***';
|
||||
if(!is_array($id))
|
||||
{
|
||||
foreach($array as $value)
|
||||
{
|
||||
if($id == $value['answer_id'])
|
||||
{
|
||||
return ($value['answer']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$final_string = '';
|
||||
|
||||
foreach($id as $value)
|
||||
{
|
||||
//echo $value.'****'.strcasecmp($value,'Others').'#';
|
||||
foreach($array as $mas_value)
|
||||
{
|
||||
if( !strcasecmp($value,$mas_value['answer_id']) && (!substr_count($mas_value['answer'],'Others')) )
|
||||
{
|
||||
$final_string .= $mas_value['answer'] . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
// print_r($final_string);//die();
|
||||
return $final_string;
|
||||
}
|
||||
|
||||
}
|
||||
}// Class Ends
|
||||
|
||||
345
api/application/views/sale_pd_templates/FHFSL.php
Normal file
345
api/application/views/sale_pd_templates/FHFSL.php
Normal file
@ -0,0 +1,345 @@
|
||||
<?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'];
|
||||
$product_name = "";
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$title = "";
|
||||
if($master[0]['sales_pd_type'] == 3){$title = "Office FI PD "; }else if($master[0]['sales_pd_type'] == 4){$title = "Residence FI PD ";}
|
||||
$smc_emp_code = $master[0]['smc_emp_code'];
|
||||
?><!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 (FLYHI Team)
|
||||
</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" ><?php echo $title ?>Personal Discussion by FlyHI Team - <?php echo $product_name; ?> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['lender_name'] ? $section1['lender_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Branch</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['branch'] ? $section1['branch'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Application ID</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['loan_application_id'] ? $section1['loan_application_id'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender sales Person</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['lender_sales_person'] ? $section1['lender_sales_person'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender credit Person</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['lender_credit_person'] ? $section1['lender_credit_person'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Product Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['product_name']? $section1['product_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="3" ><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Verification Type</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['verification_type']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" rowspan="2" ><?php if($master[0]['sales_pd_type'] == 4){echo 'Residence Address Details'; }else{ echo 'Office Address Details'; } ?></td>
|
||||
<td class = "tdcenteralign" colspan="7"><?php if($master[0]['sales_pd_type'] == 4){ echo $section1['residence_address']; }else{ echo $section1['residence_address']; }?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>City</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['city']?></td>
|
||||
<td>State</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['state']?></td>
|
||||
<td>PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['pincode_others'])){ echo $section1['pincode_others']; } else { echo $section1['pincode']; }?></td>
|
||||
</tr>
|
||||
|
||||
<?php if( $master[0]['sales_pd_type'] == 4){ ?>
|
||||
<tr>
|
||||
<td colspan="3">Residence Ownership</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['residence_ownership'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Years at current Residence</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['years_at_current_residence'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Same as current residence address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['Same_as_current_residence_address'];?></td>
|
||||
</tr>
|
||||
<?php if($section1['Same_as_current_residence_address'] == 0){?>
|
||||
<tr>
|
||||
<td colspan="3">Permanent Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['permanent_address'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>City</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['city']?></td>
|
||||
<td>State</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['state']?></td>
|
||||
<td>PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['pincode_others'])){ echo $section1['pincode_others']; } else { echo $section1['pincode']; }?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td colspan="3"> Number of earning family member</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['number_of_earning_family_member'] ? $section1['number_of_earning_family_member'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Number of Dependents</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['number_of_dependents'] ? $section1['number_of_dependents'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<?php if( $master[0]['sales_pd_type'] == 3){ ?>
|
||||
<tr>
|
||||
<td colspan="3">Occupation of the loan applicant</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['occupation_of_the_loan_applicant'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Employer/Business Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_name'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Employer/Business Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td>
|
||||
</tr>
|
||||
<?php if($section1['employer_business_address'] == 0){?>
|
||||
<tr>
|
||||
<td colspan="3">Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['address'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>City</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['city']?></td>
|
||||
<td>State</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['state']?></td>
|
||||
<td>PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['pincode_others'])){ echo $section1['pincode_others']; } else { echo $section1['pincode']; }?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td colspan="3"> Constitution of Employer /Business applicant</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['constitution_of_employer_business_applicant'] ? $section1['constitution_of_employer_business_applicant'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Years at Current employment/Business</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['years_at_current_employment_business'] ? $section1['years_at_current_employment_business'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Total Work Experience</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['total_work_experience'] ? $section1['total_work_experience'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Net Monthly Salary/ Net Income</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['net_monthly_salary_net_income'] ? $section1['net_monthly_salary_net_income'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div id="page_break"></div>
|
||||
<table class="scorecard_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Additional Questions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Name of Student</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['name_of_student'] ? $section1['name_of_student'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Relationship with Applicant</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['relationship_with_applicant'] ? $section1['relationship_with_applicant'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Educational Institute Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['educational_institute_name'] ? $section1['educational_institute_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" rowspan="2" >Educational Institute Address</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['educational_institute_address'] ? $section1['educational_institute_address'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>City</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['city']?></td>
|
||||
<td>State</td>
|
||||
<td class = "tdcenteralign"><?php echo $section1['state']?></td>
|
||||
<td>PIN</td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['pincode_others'])){ echo $section1['pincode_others']; } else { echo $section1['pincode']; }?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Class /Section/ Course Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['class_section_course_name'] ? $section1['class_section_course_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Educational Institute Fee</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['educational_institute_fee'] ? $section1['educational_institute_fee'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Duration of the course</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['duration_of_the_course'] ? $section1['duration_of_the_course'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="3" ><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied'])?></td>
|
||||
<td colspan="2">Total Fund Requirement (Rs)</td>
|
||||
<td class = "tdcenteralign" colspan="2"> <?php echo $rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement'])?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" >Loan Tenure (Months)</td>
|
||||
<td class = "tdcenteralign" colspan="3" ><?php echo $section1['loan_tenure']?></td>
|
||||
<td colspan="2" >Loan Purpose (End-Use)</td>
|
||||
<td class = "tdcenteralign" colspan="2" ><?php echo $section1['loan_purpose']?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- initially br statement due to extra question. changed to page break condition -->
|
||||
<!-- <?php if( $master[0]['sales_pd_type'] == 4){ ?>
|
||||
<div id="page_break"></div> <?php } else { ?> <br> <?php } ?> -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user