From 7958ea90ccb42e29a1615da7aee2afcb6cd13647 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Mon, 22 Aug 2022 17:55:54 +0530 Subject: [PATCH] Fly Feedback 1 : ps --- .../controllers/Data_Dump_Controller.php | 2 +- .../controllers/Flyhi_Controller.php | 9 ++-- .../views/sale_pd_templates/FHFSL.php | 42 ++++++++++--------- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/api/application/controllers/Data_Dump_Controller.php b/api/application/controllers/Data_Dump_Controller.php index 69af62f6..a86fe763 100644 --- a/api/application/controllers/Data_Dump_Controller.php +++ b/api/application/controllers/Data_Dump_Controller.php @@ -846,7 +846,7 @@ class Data_Dump_Controller extends REST_Controller { $replaced_j_arr = $this->traverseArray($replaced_j_arr, $arr10,$general_format); break; case 12: - $arr9 = array("employer_name","designation_person_met"); + $arr12 = array("employer_name","designation_person_met"); $replaced_pj_arr = $this->traverseArray($replaced_pj_arr, $arr12,$general_format); $replaced_j_arr = $this->traverseArray($replaced_j_arr, $arr12,$general_format); break; diff --git a/api/application/controllers/Flyhi_Controller.php b/api/application/controllers/Flyhi_Controller.php index 600138fd..3efc140e 100644 --- a/api/application/controllers/Flyhi_Controller.php +++ b/api/application/controllers/Flyhi_Controller.php @@ -206,11 +206,11 @@ class Flyhi_Controller extends REST_Controller { public function listFlyhiPD_get(){ $user_id = $this->uri->segment(1); - $columns = array('SALES_PD_DATA.sales_pd_id','SALES_PD_DATA.sales_pd_sno','SALES_PD_DATA.applicant_name','concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name','SALES_PD_DATA.applicant_id','SALES_PD_DATA.lender_id','SALES_PD_DATA.is_pdf','SALES_PD_DATA.is_edited','ENTITY.full_name','ENTITY.short_name','SALES_PD_DATA.status','SALES_PD_DATA.sales_pd_type','SALES_PD_DATA.rand_string','SALES_PD_DATA.isactive','SALES_PD_DATA.city_id','CITY.name as city_name', 'SALES_PD_DATA.lender_sales_person','concat(LENDERSALESPERSON.first_name," ",LENDERSALESPERSON.last_name) as lender_sales_person_name','LENDERSALESPERSON.mobile_no as lender_sales_contact_mobileno','LENDERSALESPERSON.email as lender_sales_person_email', 'SALES_PD_DATA.lender_credit_person','concat(LENDERCREDITPERSON.first_name," ",LENDERCREDITPERSON.last_name) as lender_credit_person_name','LENDERCREDITPERSON.mobile_no as lender_credit_person_contact_mobileno','LENDERCREDITPERSON.email as lender_credit_person_email', 'SALES_PD_DATA.pd_branch_id','ENTITYLENDERBRANCH.branch_name','SALES_PD_DATA.loan_amount', + '(CASE WHEN SALES_PD_DATA.sales_pd_type = 3 THEN "Workplace verification" WHEN SALES_PD_DATA.sales_pd_type = 4 THEN "Residence verification" ELSE "-" END) AS sales_pd_type_master', '(CASE WHEN SALES_PD_DATA.status = "STARTED" THEN SALES_PD_DATA.createdon WHEN SALES_PD_DATA.status = "COMPLETED" THEN SALES_PD_DATA.completed_date ELSE NULL END) AS createdon'); $table = SALES_PD_DATA.' as SALES_PD_DATA'; @@ -687,9 +687,10 @@ class Flyhi_Controller extends REST_Controller { // $where_condition_array = array('SALES_PD_DATA.sales_pd_id' => $flyhipd_id); $flyhipd_data = $this->Flyhi_Model->getJoinRecords($columns,$table,$joins,$where_condition_array); $pd_type = ""; - if($flyhipd_data[0]['sales_pd_type'] == 3){$pd_type = "Office FI PD-"; }else if($flyhipd_data[0]['sales_pd_type'] == 4){$pd_type = "Residence FI PD-";} - + if($flyhipd_data[0]['sales_pd_type'] == 3){$pd_type = "Workplace FI PD-"; }else if($flyhipd_data[0]['sales_pd_type'] == 4){$pd_type = "Residence FI PD-";} + // print_r($flyhipd_data);die(); if($flyhipd_data) + // if(1) { ini_set('max_execution_time', 0); $bucket_name = LENDER_BUCKET_NAME_PREFIX.$flyhipd_data[0]['lender_id']; @@ -733,7 +734,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"; diff --git a/api/application/views/sale_pd_templates/FHFSL.php b/api/application/views/sale_pd_templates/FHFSL.php index a5db735a..37ef9737 100644 --- a/api/application/views/sale_pd_templates/FHFSL.php +++ b/api/application/views/sale_pd_templates/FHFSL.php @@ -1,13 +1,15 @@ ↑'; $downarrow = ''; $dash = ' '; - $product_name = $master[0]['abbr']; + $product_abbr = $master[0]['abbr']; + $product = $master[0]['name']; $rupee_symbol = ""; $title = ""; - if($section1['verification_type'] == "Office verification"){$title = "Office FI "; }else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI ";} + if($section1['verification_type'] == "Office verification" || $section1['verification_type'] == "Workplace verification"){$title = "Workplace FI for ".$product; } + else if($section1['verification_type'] == "Residence verification"){$title = "Residence FI for ".$product;} $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"); @@ -142,7 +144,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
@@ -155,7 +157,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Personal Discussion by FlyHI Team - + Lender Name @@ -186,11 +188,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Application Name + Applicant Name - Application Mobile Number + Applicant Mobile Number @@ -224,14 +226,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Residence Ownership - + Years at Current Residence - Same as Current Residence Address + Permanent Address Same as Current Residence Address @@ -280,13 +282,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Occupation of the Loan Applicant - + Employer/Business Name - + - Constitution of Employer /Business Applicant - + Constitution of Employer /Business + Years at Current employment/Business - Total Work Experience + Total Work Experience (in Years) - Net Monthly Salary/ Net Income - + Net Monthly Salary/ Net Income (Rs) + @@ -364,11 +366,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - Educational Institute Fee - + Educational Institute Fee (Rs) + - Duration of the Course + Duration of the Course (months)