FlyHI : ps

This commit is contained in:
VE10-Sanjeev 2022-06-14 22:17:13 +05:30
parent d092634876
commit cbf401e483
2 changed files with 208 additions and 166 deletions

View File

@ -15,6 +15,7 @@ class Flyhi_Controller extends REST_Controller {
$this->load->library('pdfgenerator');
$this->load->helper('satellite_image');
$this->load->helper('camunda');
$this->external_path = $this->config->item('external_data_path');
}
@ -63,7 +64,7 @@ class Flyhi_Controller extends REST_Controller {
$where_condition_array[$key_date] = $condition_value;
// ----END OF FILTERING THE LAST 10 DAYS RECORDS---
$FHFSL_lender = (ENVIRONMENT == 'production' ? 0 : 49);
$FHFSL_lender = (ENVIRONMENT == 'production' ? 19 : 49);
if($user_id && is_numeric($user_id))
{ $where_condition_array['SALES_PD_DATA.createdby'] = $user_id; }
@ -95,7 +96,7 @@ class Flyhi_Controller extends REST_Controller {
$is_entry_done = null;
$flyhi_pd_id = null;
$section_data = json_encode($records);
$fk_createdby = $records['fk_createdby'];
$fk_createdby = isset($records['fk_createdby']) ? $records['fk_createdby'] : "";
$applicant_id = null;
$applicant_name = null;
$city = null;
@ -103,7 +104,8 @@ class Flyhi_Controller extends REST_Controller {
$loan_amount = null;
$pd_branch_id = null;
$lender_sales_person = null;
$lender_credit_person = null;
$lender_credit_person = null;
$product_id = null;
// $product_short_name = $this->Sales_PD_Model->selectCustomRecords(array('abbr'),array('product_id' => $records['product_id']),PRODUCTS);
log_message('ERROR','####FLYHI-PD SAVE CALLED');
@ -129,44 +131,68 @@ class Flyhi_Controller extends REST_Controller {
{
foreach ($records['questions'] as $g_key => $g_value)
{
if($g_value['question_key'] == 'application_id')
if(isset($g_value['question_key']) && $g_value['question_key'] === 'loan_application_id')
{
$applicant_id = $g_value['answer_value'] ? $g_value['answer_value'] : 'Not Provided';
}
if($g_value['question_key'] == 'company_name')
{
$applicant_name = $g_value['answer_value'];
}
if($g_value['question_key'] == 'residence_address_city')
{
$city = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_name')
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_name')
{
$lender_id = $g_value['answer_value'];
}
if($g_value['question_key'] == 'loan_amount')
if(isset($g_value['question_key']) && $g_value['question_key'] == 'loan_amount')
{
$loan_amount = $g_value['answer_value'];
}
if($g_value['question_key'] == 'branch')
if(isset($g_value['question_key']) && $g_value['question_key'] == 'branch')
{
$pd_branch_id = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_sales_person')
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_sales_person')
{
$lender_sales_person = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_credit_person')
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_credit_person')
{
$lender_credit_person = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'product_name')
{
$product_id = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'verification_type')
{
if(isset($g_value['onchange_properties']))
{
foreach ($g_value['onchange_properties'] as $h_key => $h_value)
{
foreach ($h_value['form_controls'] as $i_key => $i_value)
{
foreach ($i_value['questions'] as $j_key => $j_value)
{
if($g_value['answer_value'] == 'Residence verification' && $j_value['question_key'] == 'residence_city'){
$city = $j_value['answer_value'];
$sales_pd_type = 4;
}
if($g_value['answer_value'] == 'Office verification' && $j_value['question_key'] == 'officer_city'){
$city = $j_value['answer_value'];
$sales_pd_type = 3;
}
if($g_value['answer_value'] == 'Office verification' && $j_value['question_key'] == 'employer_business_name')
{
$applicant_name = $j_value['answer_value'];
}
}
}
}
}
}
}
}
$count = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $lender_id,'isactive' => 1),SALES_PD_DATA);
$lender_short_name = $this->Flyhi_Model->selectCustomRecords(array('short_name'),array('entity_id' => $lender_id),ENTITY);
$flyhipd_serial_no = $lender_short_name.'-'.(++$count[0]['count']);
$flyhipd_serial_no = $lender_short_name[0]['short_name'].'-'.(++$count[0]['count']);
$FLYHI_PD['applicant_name'] = $applicant_name;
$FLYHI_PD['applicant_id'] = $applicant_id;
$FLYHI_PD['city_id']=$city;
@ -178,6 +204,8 @@ class Flyhi_Controller extends REST_Controller {
$FLYHI_PD['lender_id'] = $lender_id;
$FLYHI_PD['createdby'] = $fk_createdby;
$FLYHI_PD['rand_string'] = $randomString;
$FLYHI_PD['sales_pd_type'] = $sales_pd_type;
$FLYHI_PD['product_id'] = $product_id ? $product_id : (ENVIRONMENT == 'production' ? 27 : 26);
$flyhi_pd_id = $this->Flyhi_Model->saveRecords($FLYHI_PD,SALES_PD_DATA);
$section_data = json_encode($records);
$this->Sales_PD_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('sales_pd_id' =>$flyhi_pd_id,'section_id' => 1 ));
@ -210,48 +238,80 @@ class Flyhi_Controller extends REST_Controller {
if($records['questions']){
foreach ($records['questions'] as $g_key => $g_value)
{
if($g_value['question_key'] == 'application_id')
{
$applicant_id = $g_value['answer_value'] ? $g_value['answer_value'] : 'Not Provided';
}
if($g_value['question_key'] == 'company_name')
{
$applicant_name = $g_value['answer_value'];
if(isset($g_value['question_key']) && $g_value['question_key'] === 'loan_application_id')
{
$applicant_id = $g_value['answer_value'] ? $g_value['answer_value'] : 'Not Provided';
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_name')
{
$lender_id = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'loan_amount')
{
$loan_amount = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'branch')
{
$pd_branch_id = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_sales_person')
{
$lender_sales_person = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'lender_credit_person')
{
$lender_credit_person = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'product_name')
{
$product_id = $g_value['answer_value'];
}
if(isset($g_value['question_key']) && $g_value['question_key'] == 'verification_type')
{
if(isset($g_value['onchange_properties']))
{
foreach ($g_value['onchange_properties'] as $h_key => $h_value)
{
foreach ($h_value['form_controls'] as $i_key => $i_value)
{
foreach ($i_value['questions'] as $j_key => $j_value)
{
if($g_value['answer_value'] == 'Residence verification' && $j_value['question_key'] == 'residence_city'){
$city = $j_value['answer_value'];
$sales_pd_type = 4;
}
if($g_value['answer_value'] == 'Office verification' && $j_value['question_key'] == 'officer_city'){
$city = $j_value['answer_value'];
$sales_pd_type = 3;
}
if($g_value['answer_value'] == 'Office verification' && $j_value['question_key'] == 'employer_business_name')
{
$applicant_name = $j_value['answer_value'];
}
}
}
}
}
}
}
if($g_value['question_key'] == 'residence_address_city')
{
$city = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_name')
{
$lender_id = $g_value['answer_value'];
}
if($g_value['question_key'] == 'loan_amount')
{
$loan_amount = $g_value['answer_value'];
}
if($g_value['question_key'] == 'branch')
{
$pd_branch_id = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_sales_person')
{
$lender_sales_person = $g_value['answer_value'];
}
if($g_value['question_key'] == 'lender_credit_person')
{
$lender_credit_person = $g_value['answer_value'];
}
}
}
$FLYHI_PD['applicant_name'] = $applicant_name;
$FLYHI_PD['applicant_id'] = $applicant_id;
$FLYHI_PD['city_id']=$city;
$FLYHI_PD['loan_amount'] = $loan_amount;
$FLYHI_PD['lender_sales_person'] = $lender_sales_person ;
$FLYHI_PD['lender_credit_person'] = $lender_credit_person ;
$FLYHI_PD['pd_branch_id'] = $pd_branch_id;
$FLYHI_PD['lender_id'] = $lender_id;
$FLYHI_PD['applicant_name'] = int($applicant_name);
$FLYHI_PD['applicant_id'] = int($applicant_id);
$FLYHI_PD['city_id']=int($city);
$FLYHI_PD['loan_amount'] = int($loan_amount);
$FLYHI_PD['lender_sales_person'] = int($lender_sales_person) ;
$FLYHI_PD['lender_credit_person'] = int($lender_credit_person) ;
$FLYHI_PD['pd_branch_id'] = int($pd_branch_id);
$FLYHI_PD['lender_id'] = int($lender_id);
$FLYHI_PD['product_id'] = int($product_id);
$flyhi_pd_id = $this->Flyhi_Model->updateRecords($FLYHI_PD,SALES_PD_DATA,array('sales_pd_id' => $flyhi_pd_id));
$status = $records['is_complete'];
$fields = array('sales_pd_id' => $flyhi_pd_id, 'section_id' => 1, 'status' =>$status ,'section_data' => $section_data,'createdby' => $fk_createdby);
@ -273,7 +333,7 @@ class Flyhi_Controller extends REST_Controller {
$data['msg'] = 'Something went wrong! Try Later';
$this->response($data,REST_Controller::HTTP_OK);
}
}
}
public function getFlyhiPD_get()
{
@ -336,16 +396,16 @@ class Flyhi_Controller extends REST_Controller {
function prepareFlyhiPDReport($pd_id,$api = true)
{
log_message('ERROR','####PREPARE Flyhi PD REPORT CALLED'.$pd_id);
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','PRODUCT.abbr','USERPROFILE.smc_emp_code');
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','PRODUCT.name','PRODUCT.abbr','USERPROFILE.smc_emp_code');
// $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' => PRODUCTS. ' as PRODUCT',
// 'condition' =>'SALES_PD_DATA.product_id = PRODUCT.product_id',
// 'jointype' => 'INNER'),
array('table' => PRODUCTS. ' as PRODUCT',
'condition' =>'SALES_PD_DATA.product_id = PRODUCT.product_id',
'jointype' => 'INNER'),
array('table' => USERPROFILE. ' as USERPROFILE',
'condition' =>'SALES_PD_DATA.createdby = USERPROFILE.userid',
'jointype' => 'LEFT')
@ -378,6 +438,7 @@ class Flyhi_Controller extends REST_Controller {
{
$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'],
@ -395,10 +456,9 @@ class Flyhi_Controller extends REST_Controller {
//$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";
$output_file = $this->external_path ."/sales_pd/" .$pd_id. "/temp.pdf";
$bytes = file_put_contents($output_file, $pdf_doc);
//echo $bytes;
//die();
@ -454,27 +514,12 @@ class Flyhi_Controller extends REST_Controller {
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)
@ -488,12 +533,13 @@ class Flyhi_Controller extends REST_Controller {
{
$temp_array[ $question['question_key'] ] = isset($question['answer_value']) ? $question['answer_value'] : null;
if($question['question_key'] == 'residence_state' || $question['question_key'] == 'residence_address_city' || $question['question_key'] == 'residence_pincode' ||
$question['question_key'] == 'business_state'|| $question['question_key'] == 'business_city'|| $question['question_key'] == 'business_city' ||
$question['question_key'] == 'permanent_state' || $question['question_key'] == 'permanent_address_city' || $question['question_key'] == 'permanent_pincode' ||
$question['question_key'] == 'employer_business_state' || $question['question_key'] == 'employer_business_address_city' || $question['question_key'] == 'employer_business_pincode' ||
$question['question_key'] == 'educational_institute_state' || $question['question_key'] == 'educational_institute_address_city' || $question['question_key'] == 'educational_institute_pincode'
)
if($question['question_key'] == 'residence_state' || $question['question_key'] == 'residence_city' || $question['question_key'] == 'residence_pincode' ||
$question['question_key'] == 'business_state'|| $question['question_key'] == 'business_city'|| $question['question_key'] == 'business_pincode' ||
$question['question_key'] == 'permanent_state' || $question['question_key'] == 'permanent_city' || $question['question_key'] == 'permanent_pincode' ||
$question['question_key'] == 'officer_state' || $question['question_key'] == 'officer_city' || $question['question_key'] == 'officer_pincode')
// $question['question_key'] == 'employer_business_state' || $question['question_key'] == 'employer_business_address_city' || $question['question_key'] == 'employer_business_pincode' ||
// $question['question_key'] == 'educational_institute_state' || $question['question_key'] == 'educational_institute_address_city' || $question['question_key'] == 'educational_institute_pincode'
// )
{
//if($question['type'] == 4) { print_r($question['answer_value']); }
$temp_array[ $question['question_key'] ] = $this->getMasterData($question['answer_value'],$question['answers']);

View File

@ -1,14 +1,13 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// print_r($master);
$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 = "";
$product_name = $master[0]['abbr'];
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
$title = "";
if($section1['verification_type'] == "Office verification"){$title = "Office FI PD "; }else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI PD ";}
if($section1['verification_type'] == "Office verification"){$title = "Office FI "; }else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI ";}
$smc_emp_code = $master[0]['smc_emp_code'];
$residence_ownership_arr = array("self_owned" => "Self-Owned","parental"=>"Parental","family_owned"=>"Family Owned","rented"=>"Rented");
$residence_yr_arr = array("0"=>"< 1 yr","1"=>"1-2 yrs","2"=>"2 to 5 yrs","3"=>"> 5 yrs");
@ -146,9 +145,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<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> -->
<div>
<img style="width:100px;height:50px;opacity: 0.5;" src='https://pdgenie.com/logo/sineedge_red.png'/>
</div>
<hr>
</header>
@ -180,84 +179,85 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tr>
<tr>
<td colspan="3"> Product Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['product_name']? $section1['product_name'] : 'Not Provided'?> </td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($master[0]['name'])? $master[0]['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>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['loan_amount'] ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount']) : 'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3"> Verification Type</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['verification_type']?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['verification_type'] ? $section1['verification_type'] : 'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3" rowspan="2" ><?php if($section1['verification_type'] == "Residence verification"){echo 'Residence Address Details'; }else{ echo 'Office Address Details'; } ?></td>
<td class = "tdcenteralign" colspan="7"><?php if($section1['verification_type'] == "Residence verification"){ echo $section1['residence_address']; }else{ echo $section1['residence_address']; }?></td>
</tr>
<?php if( $section1['verification_type'] == "Residence verification"){ ?>
<td class = "tdcenteralign" colspan="7"><?php if($section1['verification_type'] == "Residence verification" && isset($section1['residence_address'])){ echo $section1['residence_address']; }else if($section1['verification_type'] == "Office verification" && isset($section1['officer_address'])){ echo $section1['officer_address']; }else{ echo 'Not Provided'; }?></td>
</tr>
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Residence verification"){ ?>
<tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo $section1['residence_city']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $section1['residence_state']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['residence_address_pincode_others'])){ echo $section1['residence_pincode_others']; } else { echo $section1['residence_pincode']; }?></td>
<td colspan="2">City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['residence_city'])?$section1['residence_city']:'Not Provided'; ?></td>
<td colspan="2">State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['residence_state'])?$section1['residence_state']:'Not Provided'; ?></td>
<td colspan="2">PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['residence_pincode_others'])){ echo $section1['residence_pincode_others']; } else if(isset($section1['residence_pincode'])) { echo $section1['residence_pincode']; }else {echo "-";}?></td>
</tr>
<tr>
<td colspan="3">Residence Ownership</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $residence_ownership_arr[$section1['residence_ownership']];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $residence_ownership_arr[$section1['residence_ownership']] :'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Years at current Residence</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $residence_yr_arr[$section1['years_at_current_residence']];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_residence'])?$residence_yr_arr[$section1['years_at_current_residence']]:'Not Provided'; ?> </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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_residence_address'])?$section1['Same_as_current_residence_address']:'Not Provided'; ?> </td>
</tr>
<?php if($section1['Same_as_current_residence_address'] == 'No'){?>
<?php if(isset($section1['Same_as_current_residence_address']) && $section1['Same_as_current_residence_address'] == 'No'){?>
<tr>
<td colspan="3">Permanent Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['permanent_address'];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['permanent_address'])?$section1['permanent_address']:'Not Provided'; ?> </td>
</tr>
<tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo $section1['permanent_address_city']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $section1['permanent_address_state']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['permanent_address_pincode_others'])){ echo $section1['permanent_address_pincode_others']; } else { echo $section1['permanent_address_pincode']; }?></td>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['permanent_city'])?$section1['permanent_city']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['permanent_state'])?$section1['permanent_state']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['permanent_pincode_others'])?$section1['permanent_pincode_others']:isset($section1['permanent_pincode'])?$section1['permanent_pincode']:'Not Provided'; ?></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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['number_of_dependents'])?$section1['number_of_dependents']:'Not Provided'; ?> </td>
</tr>
<?php }?>
<?php if( $section1['verification_type'] == "Office verification"){ ?>
<?php if(isset($section1['verification_type']) && $section1['verification_type'] == "Office verification"){ ?>
<tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo $section1['officer_city']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $section1['officer_state']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['officer_pincode_others'])){ echo $section1['officer_pincode_others']; } else { echo $section1['officer_pincode']; }?></td>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['officer_city'])?$section1['officer_city']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['officer_state'])?$section1['officer_state']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_others'])?$section1['officer_pincode_others']:isset($section1['officer_pincode'])?$section1['officer_pincode']:'Not Provided'; ?></td>
</tr>
<tr>
<td colspan="3">Occupation of the loan applicant</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $occupation_arr[$section1['occupation_of_the_loan_applicant']];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['occupation_of_the_loan_applicant'])?$occupation_arr[$section1['occupation_of_the_loan_applicant']]:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Employer/Business Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_name'];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['employer_business_name'])?$section1['employer_business_name']:'Not Provided'; ?> </td>
</tr>
<tr>
<td colspan="3">Employer/Business Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['business_address'];?></td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['business_address'])?$section1['business_address']:'Not Provided'; ?> </td>
</tr>
<!-- <?php if($section1['employer_business_address'] == 0){?> -->
<!-- <tr>
@ -265,29 +265,29 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td>
</tr> -->
<tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo $section1['business_city']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $section1['business_state']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['business_pincode_others'])){ echo $section1['business_pincode_others']; } else { echo $section1['business_pincode']; }?></td>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['business_city'])?$section1['business_city']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['business_state'])?$section1['business_state']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_others'])?$section1['business_pincode_others']:isset($section1['business_pincode'])?$section1['business_pincode']:'Not Provided'; ?></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'] ? $constitution_arr[$section1['constitution_of_employer_business_applicant']] : 'Not Provided'?> </td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['constitution_of_employer_business_applicant']) ? $constitution_arr[$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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['net_monthly_salary_net_income'])?$section1['net_monthly_salary_net_income']:'Not Provided'; ?> </td>
</tr>
<?php } ?>
</tbody>
@ -301,57 +301,53 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td colspan="3">Educational Institute Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['educational_institute_address'])?$section1['educational_institute_address']:'Not Provided'; ?> </td>
</tr>
<!-- <tr>
<td>City</td>
<td class = "tdcenteralign"><?php echo $section1['educational_institute_address_city']?></td>
<td>State</td>
<td class = "tdcenteralign"><?php echo $section1['educational_institute_address_state']?></td>
<td>PIN</td>
<td class = "tdcenteralign" colspan="2"><?php if(isset($section1['educational_institute_address_pincode_others'])){ echo $section1['educational_institute_address_pincode_others']; } else { echo $section1['educational_institute_address_pincode']; }?></td>
</tr> -->
<tr>
<td colspan="2" >City</td>
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['educational_institute_address_city'])?$section1['educational_institute_address_city']:'Not Provided'; ?></td>
<td colspan="2" >State</td>
<td class = "tdcenteralign" colspan="1"><?php echo isset($section1['educational_institute_address_state'])?$section1['educational_institute_address_state']:'Not Provided'; ?></td>
<td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['educational_institute_address_pincode'])?$section1['educational_institute_address_pincode']:'Not Provided'; ?></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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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 class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_amount_applied'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied']):'Not Provided'; ?> </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>
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['total_fund_requirement'])?$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement']):'Not Provided'; ?> </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> -->
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_tenure'])?$section1['loan_tenure']:'Not Provided'; ?> </td>
<td colspan="2" >Loan Purpose (End-Use)</td>
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['loan_purpose'])?$section1['loan_purpose']:'Not Provided'; ?> </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 } ?> -->
</table>
</body>
</html>