Flyhi Report Completed : ps
This commit is contained in:
parent
1249f11e5c
commit
7e5be8746e
@ -694,6 +694,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
// print_r($section['section_id']);die();
|
||||
// log_message('ERROR','####PREPARE SALESPD REPORT CALLED'.$pd_id);
|
||||
$view_data['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);//die();
|
||||
// print_r($view_data['section'.$section['section_id'] ]);die;
|
||||
$section_fields['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);
|
||||
}
|
||||
$view_data['section9'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||
@ -704,7 +705,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
//$view_name = $flyhipd_data[0]['short_name'].'_'.$flyhipd_data[0]['abbr'];
|
||||
$view_name = $flyhipd_data[0]['short_name'];
|
||||
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
||||
echo $html_content;die();
|
||||
// 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";
|
||||
@ -846,7 +847,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
if(count($result_data))
|
||||
{
|
||||
$new_key = $ques_key . '_master';
|
||||
$questions[$new_key] = $result_data[0]['pincode'];
|
||||
$questions[$new_key] = $ques_value;
|
||||
}
|
||||
|
||||
}if($ques_key == 'business_pincode_others' && $ques_value == "1"){
|
||||
@ -865,7 +866,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
}
|
||||
}if($ques_key == 'permanent_pincode_others' && $ques_value == "1"){
|
||||
$new_key = $ques_key . 'permanent_pincode_master';
|
||||
$questions[$new_key] = $result_data[0]['pincode'];
|
||||
$questions[$new_key] = $ques_value;
|
||||
}
|
||||
if($ques_key == 'officer_pincode' && $ques_value != "1"){
|
||||
// residence_pincode: "1"
|
||||
@ -881,7 +882,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
}
|
||||
}if($ques_key == 'officer_pincode_others'){
|
||||
$new_key = 'officer_pincode_master';
|
||||
$questions[$new_key] = $result_data[0]['pincode'];
|
||||
$questions[$new_key] = $ques_value;
|
||||
}
|
||||
if($ques_key == 'lender_name'){
|
||||
$table = ENTITY;
|
||||
@ -942,11 +943,51 @@ class Flyhi_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
if($ques_key == 'residence_details'){
|
||||
|
||||
for($i=0;$i<count($ques_value);$i++){
|
||||
if(isset($ques_value[$i]['residence_state'])){
|
||||
$table = STATE;
|
||||
$fields = array('name');
|
||||
$where_condition_array = array('isactive' => 1,'state_id'=>$ques_value[$i]['residence_state']);
|
||||
$result_data = $this->Flyhi_Model->selectCustomRecords($fields,$where_condition_array,$table);
|
||||
$new_key = 'residence_state_master';
|
||||
if(count($result_data))
|
||||
{
|
||||
$questions[$ques_key][$i][$new_key] = $result_data[0]['name'];
|
||||
}else{
|
||||
$questions[$ques_key][$i][$new_key] = 'name';
|
||||
}
|
||||
}
|
||||
if(isset($ques_value[$i]['residence_city'])){
|
||||
$table = CITY;
|
||||
$fields = array('name');
|
||||
$where_condition_array = array('isactive' => 1,'city_id'=>$ques_value[$i]['residence_city']);
|
||||
$result_data = $this->Flyhi_Model->selectCustomRecords($fields,$where_condition_array,$table);
|
||||
$new_key = 'residence_city_master';
|
||||
if(count($result_data))
|
||||
{
|
||||
$questions[$ques_key][$i][$new_key] = $result_data[0]['name'];
|
||||
}
|
||||
}
|
||||
if(isset($ques_value[$i]['residence_pincode'])){
|
||||
$table = PINCODE;
|
||||
$fields = array('pincode');
|
||||
$where_condition_array = array('pincode_id'=>$ques_value[$i]['residence_pincode']);
|
||||
$result_data = $this->Flyhi_Model->selectCustomRecords($fields,$where_condition_array,$table);
|
||||
$new_key = 'residence_pincode_master';
|
||||
if(count($result_data))
|
||||
{
|
||||
$questions[$ques_key][$i][$new_key] = $result_data[0]['pincode'];
|
||||
}
|
||||
}
|
||||
if(isset($ques_value[$i]['residence_pincode_others'])){
|
||||
$new_key = 'residence_pincode_master';
|
||||
$questions[$ques_key][$i][$new_key] = $ques_value[$i]['residence_pincode_others'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
print_r($questions);die();
|
||||
return $questions;
|
||||
}
|
||||
|
||||
function processFlyhiPDQuestions($questions,$section_id)
|
||||
|
||||
@ -159,43 +159,43 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Lender Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['lender_name'] ? $section1['lender_name'] : 'Not Provided'?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_name_master']) ? $section1['lender_name_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Branch</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['branch'] ? $section1['branch'] : 'Not Provided'?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['branch_master']) ? $section1['branch_master'] : '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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_sales_person_master']) ? $section1['lender_sales_person_master'] : '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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_credit_person_master']) ? $section1['lender_credit_person_master'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Product Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($master[0]['name'])? $master[0]['name'] : 'Not Provided'?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['product_name_master']) ? $section1['product_name_master'] : (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="7"> <?php echo $section1['loan_amount'] ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount']) : 'Not Provided'; ?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['loan_amount']) ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount']) : 'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Application Name</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['applicant_name'] ? $section1['applicant_name'] : 'Not Provided'?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_name']) ? $section1['applicant_name'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Application Mobile Number</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['applicant_mobile_no'] ? $section1['applicant_mobile_no'] : 'Not Provided'?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['applicant_mobile_no']) ? $section1['applicant_mobile_no'] : 'Not Provided'?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"> Verification Type</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['verification_type'] ? $section1['verification_type'] : 'Not Provided'; ?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['verification_type']) ? $section1['verification_type'] : 'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -205,25 +205,30 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<tr>
|
||||
<th class="thlargefont" colspan="10">Residence Details</th>
|
||||
</tr>
|
||||
<?php if(isset($section1['residence_details'])){
|
||||
$rd_data = $section1['residence_details'];
|
||||
for($i = 0; $i < count($rd_data); $i++){?>
|
||||
<tr>
|
||||
<td colspan="3">Address Details</td>
|
||||
<td class = "tdcenteralign" colspan="7"><?php if(isset($section1['residence_address'])){ echo $section1['residence_address']; }else{ echo 'Not Provided'; }?></td>
|
||||
<td colspan="3"><?php echo ($i+1)." . "; ?>Address Details</td>
|
||||
<td class = "tdcenteralign" colspan="7"><?php if(isset($rd_data[$i]['residence_address'])){ echo $rd_data[$i]['residence_address']; }else{ echo 'Not Provided'; }?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['residence_city'])?$section1['residence_city']:'Not Provided'; ?></td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($rd_data[$i]['residence_city_master'])?$rd_data[$i]['residence_city_master']:'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 class = "tdcenteralign" colspan="1"><?php echo isset($rd_data[$i]['residence_state_master'])?$rd_data[$i]['residence_state_master']:'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 'Not Provided';}?></td>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($rd_data[$i]['residence_pincode_master']) ?$rd_data[$i]['residence_pincode_master']: 'Not Provided';?></td>
|
||||
</tr>
|
||||
<?php } }?>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Residence Ownership</td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $residence_ownership_arr[$section1['residence_ownership']] :'Not Provided'; ?> </td>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $section1['residence_ownership'] :'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_residence'])?$section1['years_at_current_residence']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Same as current residence address</td>
|
||||
@ -236,11 +241,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['permanent_city'])?$section1['permanent_city']:'Not Provided'; ?></td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['permanent_city_master'])?$section1['permanent_city_master']:'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 class = "tdcenteralign" colspan="1"><?php echo isset($section1['permanent_state_master'])?$section1['permanent_state_master']:'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>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['permanent_pincode_master'])?$section1['permanent_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
@ -267,15 +272,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['officer_city'])?$section1['officer_city']:'Not Provided'; ?></td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['officer_city_master'])?$section1['officer_city_master']:'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 class = "tdcenteralign" colspan="1"><?php echo isset($section1['officer_state_master'])?$section1['officer_state_master']:'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>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_master'])?$section1['officer_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['occupation_of_the_loan_applicant'])?$section1['occupation_of_the_loan_applicant']:'Not Provided'; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Employer/Business Name</td>
|
||||
@ -292,16 +297,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td colspan="2" >City</td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['business_city'])?$section1['business_city']:'Not Provided'; ?></td>
|
||||
<td class = "tdcenteralign" colspan="1" ><?php echo isset($section1['business_city_master'])?$section1['business_city_master']:'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 class = "tdcenteralign" colspan="1"><?php echo isset($section1['business_state_master'])?$section1['business_state_master']:'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>
|
||||
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_master'])?$section1['business_pincode_master']:'Not Provided'; ?></td>
|
||||
</tr>
|
||||
<!-- <?php } ?> -->
|
||||
<tr>
|
||||
<td colspan="3"> Constitution of Employer /Business applicant</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>
|
||||
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user