Review Changes DOn e: ps

This commit is contained in:
VE10-Sanjeev 2022-06-27 22:03:05 +05:30
parent de4045a55e
commit 98d9ea4a1d
3 changed files with 44 additions and 33 deletions

View File

@ -389,10 +389,3 @@ $route['getFlyhiLenderList'] = 'Flyhi_Controller/lenderMasterForFlyhiPD';
$route['saveFlyhiPDImage'] = 'Flyhi_Controller/saveFlyhiPDImage'; $route['saveFlyhiPDImage'] = 'Flyhi_Controller/saveFlyhiPDImage';
$route['getFlyhiPDImgDataCusLink']='Flyhi_Controller/getFlyhiPDImgDataCusLink'; $route['getFlyhiPDImgDataCusLink']='Flyhi_Controller/getFlyhiPDImgDataCusLink';
$route['saveFlyhiPDsection'] = 'Flyhi_Controller/saveFlyhiPDsection'; $route['saveFlyhiPDsection'] = 'Flyhi_Controller/saveFlyhiPDsection';
$route['saveCusFlyhiVideo'] = 'Flyhi_Controller/saveCusFlyhiVideo';
$route['getFlyhiVideoURL'] = 'Flyhi_Controller/getFlyhiVideoURL';
$route['deleteFlyhiVideo'] = 'Flyhi_Controller/deleteFlyhiVideo';
$route['uploadFlyhiVideoFile'] = 'Flyhi_Controller/uploadFlyhiVideoFile';
$route['updateTwlioFlyhiVideoStatus'] = 'Flyhi_Controller/updateTwlioFlyhiVideoStatus';

View File

@ -684,7 +684,7 @@ class Flyhi_Controller extends REST_Controller {
$all_section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $pd_id,'isactive' => 1),SALESPD_SECTION_DATA,array(),'','section_id','ASC'); $all_section_data = $this->Flyhi_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(); // print_r(json_decode($all_section_data[0]['json'],true));die();
$view_data['master'] = $flyhipd_data; $view_data['master'] = $flyhipd_data;
$common_fields = array('pdid'=>$flyhipd_data[0]['sales_pd_id'], $common_fields = array('pdid'=>$flyhipd_data[0]['sales_pd_id'],
// 'product'=>$flyhipd_data[0]['abbr'], // 'product'=>$flyhipd_data[0]['abbr'],
@ -767,12 +767,16 @@ class Flyhi_Controller extends REST_Controller {
if($section_array['section_id']) if($section_array['section_id'])
{ {
$questions = json_decode($section_array['section_data'],true); $questions = json_decode($section_array['section_data'],true);
// echo "770";
// print_r($questions['json']);die;
return $this->processFlyhiPDData($questions['json'],$section_array['section_id']); return $this->processFlyhiPDData($questions['json'],$section_array['section_id']);
// return $this->processFlyhiPDQuestions($questions['questions'],$section_array['section_id']); // return $this->processFlyhiPDQuestions($questions['questions'],$section_array['section_id']);
} }
} }
function processFlyhiPDData($questions,$section_id){ function processFlyhiPDData($questions,$section_id){
// print_r($questions);die();
$temp_array = array(); $temp_array = array();
if(!empty($questions)){
foreach ($questions as $ques_key => $ques_value) { foreach ($questions as $ques_key => $ques_value) {
if($ques_key == 'permanent_state' && !empty($ques_value)){ if($ques_key == 'permanent_state' && !empty($ques_value)){
@ -808,7 +812,7 @@ class Flyhi_Controller extends REST_Controller {
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
} }
if($ques_key == 'permanent_city'){ if($ques_key == 'permanent_city' && !empty($ques_value)){
$table = CITY; $table = CITY;
$fields = array('name'); $fields = array('name');
$where_condition_array = array('isactive' => 1,'city_id'=>$ques_value); $where_condition_array = array('isactive' => 1,'city_id'=>$ques_value);
@ -818,7 +822,7 @@ class Flyhi_Controller extends REST_Controller {
$new_key = $ques_key . '_master'; $new_key = $ques_key . '_master';
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
}if($ques_key == 'business_city'){ }if($ques_key == 'business_city' && !empty($ques_value)){
$table = CITY; $table = CITY;
$fields = array('name'); $fields = array('name');
$where_condition_array = array('isactive' => 1,'city_id'=>$ques_value); $where_condition_array = array('isactive' => 1,'city_id'=>$ques_value);
@ -828,7 +832,7 @@ class Flyhi_Controller extends REST_Controller {
$new_key = $ques_key . '_master'; $new_key = $ques_key . '_master';
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
}if($ques_key == 'officer_city'){ }if($ques_key == 'officer_city' && !empty($ques_value)){
$table = CITY; $table = CITY;
$fields = array('name'); $fields = array('name');
$where_condition_array = array('isactive' => 1,'city_id'=>$ques_value); $where_condition_array = array('isactive' => 1,'city_id'=>$ques_value);
@ -884,7 +888,7 @@ class Flyhi_Controller extends REST_Controller {
$new_key = 'officer_pincode_master'; $new_key = 'officer_pincode_master';
$questions[$new_key] = $ques_value; $questions[$new_key] = $ques_value;
} }
if($ques_key == 'lender_name'){ if($ques_key == 'lender_name' && !empty($ques_value)){
$table = ENTITY; $table = ENTITY;
$fields = array('full_name','short_name'); $fields = array('full_name','short_name');
$where_condition_array = array('entity_id'=>$ques_value); $where_condition_array = array('entity_id'=>$ques_value);
@ -896,7 +900,7 @@ class Flyhi_Controller extends REST_Controller {
$questions["lender_abbr"] = $result_data[0]['short_name']; $questions["lender_abbr"] = $result_data[0]['short_name'];
} }
} }
if($ques_key == 'branch'){ if($ques_key == 'branch' && !empty($ques_value)){
$table = ENTITYLENDERBRANCH; $table = ENTITYLENDERBRANCH;
$fields = array('branch_name as name'); $fields = array('branch_name as name');
@ -908,7 +912,7 @@ class Flyhi_Controller extends REST_Controller {
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
} }
if($ques_key == 'lender_sales_person'){ if($ques_key == 'lender_sales_person' && !empty($ques_value)){
$table = USERPROFILE; $table = USERPROFILE;
$fields = array('concat(first_name," ",last_name) as name'); $fields = array('concat(first_name," ",last_name) as name');
$where_condition_array = array('userid'=>$ques_value); $where_condition_array = array('userid'=>$ques_value);
@ -920,7 +924,7 @@ class Flyhi_Controller extends REST_Controller {
} }
} }
if($ques_key == 'lender_credit_person'){ if($ques_key == 'lender_credit_person' && !empty($ques_value)){
$table = USERPROFILE; $table = USERPROFILE;
$fields = array('concat(first_name," ",last_name) as name'); $fields = array('concat(first_name," ",last_name) as name');
$where_condition_array = array('userid'=>$ques_value); $where_condition_array = array('userid'=>$ques_value);
@ -931,7 +935,7 @@ class Flyhi_Controller extends REST_Controller {
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
} }
if($ques_key == 'product_name'){ if($ques_key == 'product_name' && !empty($ques_value)){
$table = PRODUCTS; $table = PRODUCTS;
$fields = array('name'); $fields = array('name');
$where_condition_array = array('product_id'=>$ques_value); $where_condition_array = array('product_id'=>$ques_value);
@ -942,7 +946,7 @@ class Flyhi_Controller extends REST_Controller {
$questions[$new_key] = $result_data[0]['name']; $questions[$new_key] = $result_data[0]['name'];
} }
} }
if($ques_key == 'residence_details'){ if($ques_key == 'residence_details' && !empty($ques_value)){
for($i=0;$i<count($ques_value);$i++){ for($i=0;$i<count($ques_value);$i++){
if(isset($ques_value[$i]['residence_state'])){ if(isset($ques_value[$i]['residence_state'])){
$table = STATE; $table = STATE;
@ -987,7 +991,7 @@ class Flyhi_Controller extends REST_Controller {
} }
} }
return $questions; return $questions;}
} }
function processFlyhiPDQuestions($questions,$section_id) function processFlyhiPDQuestions($questions,$section_id)
@ -1168,7 +1172,8 @@ class Flyhi_Controller extends REST_Controller {
// print_r($product_short_name);die(); // print_r($product_short_name);die();
//sales tele pd img structure array //sales tele pd img structure array
$imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted')); // $imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'));
$imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'),'name_board_seen' => array('is_multiple' => 1,'img_name' => 'Business Name Board'),'stock_image' => array('is_multiple' => 1,'img_name' => 'Stock Images'),'workplace_interior_image' => array('is_multiple' => 1,'img_name' => 'Work Place Interior'));
$img_data = array(); $img_data = array();
@ -1396,6 +1401,7 @@ class Flyhi_Controller extends REST_Controller {
//CAMUNDA::completeSalesPDTask($records['sales_pd_id']); //CAMUNDA::completeSalesPDTask($records['sales_pd_id']);
$this->prepareFlyhiPDReport($records['sales_pd_id'],false); $this->prepareFlyhiPDReport($records['sales_pd_id'],false);
// die();
sleep(10); sleep(10);
log_message('ERROR','####FlyHiPD AFTER 10 PREPARED REPORT'.$records['sales_pd_id']); log_message('ERROR','####FlyHiPD AFTER 10 PREPARED REPORT'.$records['sales_pd_id']);
@ -1619,7 +1625,7 @@ class Flyhi_Controller extends REST_Controller {
//update Applicant ID and applicant Name to sales pD master Table //update Applicant ID and applicant Name to sales pD master Table
$applicant_id = null ; $city = null; $lender_id= null;$loan_amount = null; $applicant_id = null ; $city = null; $lender_id= null;$loan_amount = null;
$pd_branch_id = null ; $lender_sales_person =null; $lender_credit_person =null; $pd_branch_id = null ; $lender_sales_person =null; $lender_credit_person =null;
$flyhi_pd_type = null; $applicant_name =null;$current_resd_addr_check = 0 ; $flyhi_pd_type = null; $applicant_name =null;$current_resd_addr_check = 0 ; $current_office_addr_check = 0 ;
if($records['json']) if($records['json'])
{ {
foreach ($records['json'] as $g_key => $g_value) foreach ($records['json'] as $g_key => $g_value)
@ -1663,8 +1669,14 @@ class Flyhi_Controller extends REST_Controller {
}else if($g_key == 'residence_details'){ }else if($g_key == 'residence_details'){
$city = $g_value[0]['residence_city']; $city = $g_value[0]['residence_city'];
} }
if($g_key == 'officer_city'){
if($g_key == 'Same_as_current_business_address' && $g_value == 'NO'){
$current_office_addr_check = 1;
}
if($current_office_addr_check && $g_key == 'business_city'){
$city = $g_value; $city = $g_value;
}else if($g_key == 'officer_city'){
$city = $g_value;
} }
} }

View File

@ -170,11 +170,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<tr> <tr>
<td colspan="3"> Lender sales Person</td> <td colspan="3"> Lender Sales Person</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_sales_person_master']) ? $section1['lender_sales_person_master'] : '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>
<tr> <tr>
<td colspan="3"> Lender credit Person</td> <td colspan="3"> Lender Credit Person</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['lender_credit_person_master']) ? $section1['lender_credit_person_master'] : '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>
<tr> <tr>
@ -227,11 +227,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['residence_ownership']) ? $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>
<tr> <tr>
<td colspan="3">Years at current Residence</td> <td colspan="3">Years at Current Residence</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['years_at_current_residence'])?$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>
<tr> <tr>
<td colspan="3">Same as current residence address</td> <td colspan="3">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> <td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_residence_address'])?$section1['Same_as_current_residence_address']:'Not Provided'; ?> </td>
</tr> </tr>
<?php if(isset($section1['Same_as_current_residence_address']) && $section1['Same_as_current_residence_address'] == 'No'){?> <?php if(isset($section1['Same_as_current_residence_address']) && $section1['Same_as_current_residence_address'] == 'No'){?>
@ -249,7 +249,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tr> </tr>
<?php } ?> <?php } ?>
<tr> <tr>
<td colspan="3"> Number of earning family member</td> <td colspan="3"> Number of Earning Family Member</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<tr> <tr>
@ -279,18 +279,23 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_master'])?$section1['officer_pincode_master']:'Not Provided'; ?></td> <td class = "tdcenteralign" colspan="2"><?php echo isset($section1['officer_pincode_master'])?$section1['officer_pincode_master']:'Not Provided'; ?></td>
</tr> </tr>
<tr> <tr>
<td colspan="3">Occupation of the loan applicant</td> <td colspan="3">Occupation of the Loan Applicant</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['occupation_of_the_loan_applicant'])?$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>
<tr> <tr>
<td colspan="3">Employer/Business Name</td> <td colspan="3">Employer/Business Name</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['employer_business_name'])?$section1['employer_business_name']:'Not Provided'; ?> </td> <td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['employer_business_name'])?$section1['employer_business_name']:'Not Provided'; ?> </td>
</tr> </tr>
<tr>
<td colspan="3">Same as Current Business Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['Same_as_current_business_address'])?$section1['Same_as_current_business_address']:'Not Provided'; ?> </td>
</tr>
<?php if(isset($section1['Same_as_current_business_address']) && $section1['Same_as_current_business_address'] == 'No'){?>
<tr> <tr>
<td colspan="3">Employer/Business Address</td> <td colspan="3">Employer/Business Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['business_address'])?$section1['business_address']:'Not Provided'; ?> </td> <td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['business_address'])?$section1['business_address']:'Not Provided'; ?> </td>
</tr> </tr>
<!-- <?php if($section1['employer_business_address'] == 0){?> --> <!-- <?php // if($section1['employer_business_address'] == 0){ ?> -->
<!-- <tr> <!-- <tr>
<td colspan="3">Address</td> <td colspan="3">Address</td>
<td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td> <td class = "tdcenteralign" colspan="7"> <?php echo $section1['employer_business_address'];?></td>
@ -303,9 +308,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td colspan="2" >PIN</td> <td colspan="2" >PIN</td>
<td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_master'])?$section1['business_pincode_master']:'Not Provided'; ?></td> <td class = "tdcenteralign" colspan="2"><?php echo isset($section1['business_pincode_master'])?$section1['business_pincode_master']:'Not Provided'; ?></td>
</tr> </tr>
<!-- <?php } ?> --> <?php } ?>
<tr> <tr>
<td colspan="3"> Constitution of Employer /Business applicant</td> <td colspan="3"> Constitution of Employer /Business Applicant</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($section1['constitution_of_employer_business_applicant']) ? $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>
<tr> <tr>
@ -363,7 +368,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<tr> <tr>
<td colspan="3"> Duration of the course</td> <td colspan="3"> Duration of the Course</td>
<td class = "tdcenteralign" colspan="7"> <?php echo isset($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>
<tr> <tr>
@ -390,7 +395,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?> ?>
<?php <?php
$iter = 0; $iter = 0;
$photo_names = array('selfie_with_person_met' => 'Selfie with person met','satellite1' => 'satellite'); // $photo_names = array('selfie_with_person_met' => 'Selfie with person met','satellite1' => 'satellite');
$photo_names = array('selfie_with_person_met' => 'Selfie with person met','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','workplace_interior_image' => 'Workplace interior image','satellite1' => 'satellite');
$tot_rows = ceil(count($section9) / 3); $tot_rows = ceil(count($section9) / 3);