diff --git a/api/application/config/routes.php b/api/application/config/routes.php index c39f11f8..1fee1767 100755 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -389,10 +389,3 @@ $route['getFlyhiLenderList'] = 'Flyhi_Controller/lenderMasterForFlyhiPD'; $route['saveFlyhiPDImage'] = 'Flyhi_Controller/saveFlyhiPDImage'; $route['getFlyhiPDImgDataCusLink']='Flyhi_Controller/getFlyhiPDImgDataCusLink'; $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'; - - diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index 83febb0e..7344d13e 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -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'); - // 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; $common_fields = array('pdid'=>$flyhipd_data[0]['sales_pd_id'], // 'product'=>$flyhipd_data[0]['abbr'], @@ -767,12 +767,16 @@ class Flyhi_Controller extends REST_Controller { if($section_array['section_id']) { $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->processFlyhiPDQuestions($questions['questions'],$section_array['section_id']); } } function processFlyhiPDData($questions,$section_id){ + // print_r($questions);die(); $temp_array = array(); + if(!empty($questions)){ foreach ($questions as $ques_key => $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']; } } - if($ques_key == 'permanent_city'){ + if($ques_key == 'permanent_city' && !empty($ques_value)){ $table = CITY; $fields = array('name'); $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'; $questions[$new_key] = $result_data[0]['name']; } - }if($ques_key == 'business_city'){ + }if($ques_key == 'business_city' && !empty($ques_value)){ $table = CITY; $fields = array('name'); $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'; $questions[$new_key] = $result_data[0]['name']; } - }if($ques_key == 'officer_city'){ + }if($ques_key == 'officer_city' && !empty($ques_value)){ $table = CITY; $fields = array('name'); $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'; $questions[$new_key] = $ques_value; } - if($ques_key == 'lender_name'){ + if($ques_key == 'lender_name' && !empty($ques_value)){ $table = ENTITY; $fields = array('full_name','short_name'); $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']; } } - if($ques_key == 'branch'){ + if($ques_key == 'branch' && !empty($ques_value)){ $table = ENTITYLENDERBRANCH; $fields = array('branch_name as name'); @@ -908,7 +912,7 @@ class Flyhi_Controller extends REST_Controller { $questions[$new_key] = $result_data[0]['name']; } } - if($ques_key == 'lender_sales_person'){ + if($ques_key == 'lender_sales_person' && !empty($ques_value)){ $table = USERPROFILE; $fields = array('concat(first_name," ",last_name) as name'); $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; $fields = array('concat(first_name," ",last_name) as name'); $where_condition_array = array('userid'=>$ques_value); @@ -931,7 +935,7 @@ class Flyhi_Controller extends REST_Controller { $questions[$new_key] = $result_data[0]['name']; } } - if($ques_key == 'product_name'){ + if($ques_key == 'product_name' && !empty($ques_value)){ $table = PRODUCTS; $fields = array('name'); $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']; } } - if($ques_key == 'residence_details'){ + if($ques_key == 'residence_details' && !empty($ques_value)){ for($i=0;$i 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(); @@ -1396,6 +1401,7 @@ class Flyhi_Controller extends REST_Controller { //CAMUNDA::completeSalesPDTask($records['sales_pd_id']); $this->prepareFlyhiPDReport($records['sales_pd_id'],false); + // die(); sleep(10); 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 $applicant_id = null ; $city = null; $lender_id= null;$loan_amount = 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']) { foreach ($records['json'] as $g_key => $g_value) @@ -1663,8 +1669,14 @@ class Flyhi_Controller extends REST_Controller { }else if($g_key == 'residence_details'){ $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; + }else if($g_key == 'officer_city'){ + $city = $g_value; } } diff --git a/api/application/views/sale_pd_templates/FHFSL.php b/api/application/views/sale_pd_templates/FHFSL.php index f3c5866d..6644bcd7 100644 --- a/api/application/views/sale_pd_templates/FHFSL.php +++ b/api/application/views/sale_pd_templates/FHFSL.php @@ -170,11 +170,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Lender sales Person + Lender Sales Person - Lender credit Person + Lender Credit Person @@ -227,11 +227,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Years at current Residence - + Years at Current Residence + - Same as current residence address + Same as Current Residence Address @@ -249,7 +249,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Number of earning family member + Number of Earning Family Member @@ -279,18 +279,23 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Occupation of the loan applicant + Occupation of the Loan Applicant Employer/Business Name + + Same as Current Business Address + + + Employer/Business Address - + + - Constitution of Employer /Business applicant + Constitution of Employer /Business Applicant @@ -363,7 +368,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Duration of the course + Duration of the Course @@ -390,7 +395,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> '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);