From d92957fd9f2ef469ff2b0a9541378a94821edb41 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 20 Sep 2019 19:03:28 +0530 Subject: [PATCH] CLIX PAYLOAD LOG ADDON LINK CAPTURE BUSINESS FORMORDER COMMON REPORT --- api/application/controllers/PD_Controller.php | 56 ++++++++++--------- .../views/report_templates/JSONTOREPORT.php | 36 +++++++++++- .../report_templates/JSONTOREPORT_CLIX.php | 51 +++++++++++------ .../report_templates/JSONTOREPORT_RI.php | 2 +- 4 files changed, 99 insertions(+), 46 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index bfaf692d..1779d998 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -848,12 +848,12 @@ class PD_Controller extends REST_Controller { } - if(isset($pd_details['pd_status']) && $pd_details['pd_status'] == COMPLETED) + if(isset($pd_details['pd_status']) && ($pd_details['pd_status'] == COMPLETED) || ($pd_details['pd_status'] == ADD_ON_PENDING) ) { if(array_key_exists('link',$pd_details)) { - $pd_details['complete_location'] = isset($pd_details['link']) ? $pd_details['link'] : null;; + $pd_details['complete_location'] = isset($pd_details['link']) ? $pd_details['link'] : null; unset($pd_details['link']); } $pd_details['pd_visit_date'] = date('Y-m-d H:i:s'); @@ -2390,6 +2390,7 @@ public function assignPDTempalate($data) $log_info_array['pdid'] = $pdid; $log_info_array['formid'] = $formid; $log_info_array['payload_size'] = (int) $_SERVER['CONTENT_LENGTH']; + $log_info_array['payload_data'] = $records; $logger->info("SAVE FORM JSON FUNCTION CALLED - ENV (".ENVIRONMENT.")",$log_info_array); ///die(); //$inline_forms_photo_status_check = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' => $pdid),T_PD_INLINE_PHOTO_FORM_STATUS); @@ -6101,41 +6102,44 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() // $company_list = array( array('company_order_id' => 1)); //print_r($company_list); $form_array = array(); + if($ai_flag == 0) // DI case { - $form_array = array( - array('form_id' => 13,'form_name' => 'About Business'), - array('form_id' => 22,'form_name' => 'Business Assets'), - array('form_id' => 21,'form_name' => 'Business Banking'), - array('form_id' => 14,'form_name' => 'Financial Information'), - array('form_id' => 1,'form_name' => 'Supplier Details'), - array('form_id' => 2,'form_name' => 'Client Details'), - array('form_id' => 11,'form_name' => 'Stock Details'), + $form_array[] = array('form_id' => 13,'form_name' => 'About Business'); + + if(!strcasecmp($lender_short_name, 'CLIX')) + { + $form_array[] = array('form_id' => 23,'form_name' => 'Future Plans & Business Environments'); + } - ); + $form_array[] = array('form_id' => 22,'form_name' => 'Business Assets'); + $form_array[] = array('form_id' => 21,'form_name' => 'Business Banking'); + $form_array[] = array('form_id' => 14,'form_name' => 'Financial Information'); + $form_array[] = array('form_id' => 1,'form_name' => 'Supplier Details'); + $form_array[] = array('form_id' => 2,'form_name' => 'Client Details'); + $form_array[] = array('form_id' => 11,'form_name' => 'Stock Details'); + } else // AI Case { - $form_array = array( - array('form_id' => 13,'form_name' => 'About Business'), - array('form_id' => 22,'form_name' => 'Business Assets'), - array('form_id' => 21,'form_name' => 'Business Banking'), - array('form_id' => 14,'form_name' => 'Financial Information'), - array('form_id' => 1,'form_name' => 'Supplier Details'), - array('form_id' => 2,'form_name' => 'Client Details'), - array('form_id' => 11,'form_name' => 'Stock Details'), - array('form_id' => 16,'form_name' => 'Assessed Income') - - ); - - + $form_array[] = array('form_id' => 13,'form_name' => 'About Business'); + if(!strcasecmp($lender_short_name, 'CLIX')) + { + $form_array[] = array('form_id' => 23,'form_name' => 'Future Plans & Business Environments'); + } + $form_array[] = array('form_id' => 22,'form_name' => 'Business Assets'); + $form_array[] = array('form_id' => 21,'form_name' => 'Business Banking'); + $form_array[] = array('form_id' => 14,'form_name' => 'Financial Information'); + $form_array[] = array('form_id' => 1,'form_name' => 'Supplier Details'); + $form_array[] = array('form_id' => 2,'form_name' => 'Client Details'); + $form_array[] = array('form_id' => 11,'form_name' => 'Stock Details'); + $form_array[] = array('form_id' => 16,'form_name' => 'Assessed Income'); } - if(!strcasecmp($lender_short_name, 'CLIX')){$form_array[] = array('form_id' => 23,'form_name' => 'Future Plans & Business Environments');} - + //print_r($form_array);//die(); foreach($company_list as $list_key => $company) { diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 18ac7028..6a948857 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -161,6 +161,38 @@ defined('BASEPATH') OR exit('No direct script access allowed'); background-color: #0191ed; color: white;page-break-inside: avoid; +} +/* #########End of Score Card Table Styles######### */ + + /* #########Score Card for personal assest section table getting overlapped ######### */ + + .scorecard_table_resonal_assest { + /* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/ + /*font-family: Merriweather;*/ + border-collapse: collapse; + width: 100%; + +} + +.scorecard_table_resonal_assest td, .scorecard_table_resonal_assest th { + border: 1px solid #000; + padding: 8px; + + + +} + +.scorecard_table_resonal_assest tr:nth-child(even){background-color: #f2f2f2; } + +.scorecard_table_resonal_assest tr:hover {background-color: #ddd;} + +.scorecard_table_resonal_assest th { + padding-top: 8px; + padding-bottom: 8px; + text-align: center; + background-color: #0191ed; + color: white; + } /* #########End of Score Card Table Styles######### */ @@ -1158,7 +1190,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $to_dispaly = !strcasecmp($loan_form['is_there_total_fund'], 'yes disclose') ? ('Disclosed '.""." ".MYUTIL::customIndianNumberFormat($loan_form['fund_amt']).' ('.MYUTIL::numtowords($loan_form['fund_amt']).')'):'Not Disclosed'; $loan_table_dispaly_rows[] = array('particulars' => 'Total Fund Requirement','details' => $to_dispaly); } - $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months'); + $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'] != "" ? $loan_form['loan_tenure'].' Months' : 'Not provided'); $end_use = ''; $to_remove_for = false; @@ -3628,7 +3660,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - +
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php index f2a550d9..96ccb8ce 100644 --- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php +++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php @@ -468,7 +468,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo "

"; echo "
"; - echo "

PERSONAL DISCUSSION REPORT

"; + echo "

PERSONAL DISCUSSION REPORT CLIX

"; echo "
for the case of
"; echo "

".$main_applicant_name."

"; @@ -495,7 +495,22 @@ defined('BASEPATH') OR exit('No direct script access allowed'); //echo "

Loan Amount Applied For :

"; //echo '
Sr.No
echo ''; + $general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true); + $front_page_business_names = ''; + if(isset($general_form['companies']) && count($general_form['companies'])) + { + foreach ($general_form['companies'] as $comp_key => $ind_company) { + + $front_page_business_names .= $ind_company['company_name'] .','; + } + } + + $front_page_business_names = substr_replace($front_page_business_names,'',-1); + $front_page_business_names = strripos($front_page_business_names, ',') ? substr_replace($front_page_business_names,'and',strripos($front_page_business_names, ','),1 ) : $front_page_business_names; + echo ''; echo '
Loan Amount
(As Per PD Initiation)
: ' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '
('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
Loan Amount
(As Per Loan Applicants during PD)
: ' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '
('. MYUTIL::numtowords($loan_form['loan_amount']) .')
Business Name(s) : '.($front_page_business_names).'
'; + + //echo "
"; echo "

"; echo "

"; @@ -518,7 +533,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); 'Others', 2 => 'Public Ltd Company', 3 => 'Sole proprietorship', 4 => 'HUF (Hindu Undivided Family)', 5 => 'Partnership',6 => 'Cooperative',7 => 'Limited Liability Partnership(LLP)',8 => 'OPC (One Person Company)',9 => 'Society',10 => 'Trust',11 => 'Private Limited Company'); + foreach ($general_form['companies'] as $comp_key => $ind_company) { + if($ind_company['is_company_applicant'] != null) + { + + echo ''. $ind_company['company_name'] .''. $ind_company['business_years']. (isset($ind_company['business_month']) ? ' . ' . $ind_company['business_month']: null) .''. ( $ind_company['business_entity_type'] == 1 ? $ind_company['business_entity_type_other'] : $business_entity_type_master[ $ind_company['business_entity_type'] ] ).' Not Applicable '; + } + + } + } + foreach($general_form['individuals'] as $ind_key => $individual) { - if($individual['is_applicant'] == true) + if($individual['is_applicant'] == true) { $education_qualification = $individual['qualification_master']; @@ -718,18 +746,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } } - if(isset($general_form['companies']) && count($general_form['companies'])) - { - $business_entity_type_master = array(1 => 'Others', 2 => 'Public Ltd Company', 3 => 'Sole proprietorship', 4 => 'HUF (Hindu Undivided Family)', 5 => 'Partnership',6 => 'Cooperative',7 => 'Limited Liability Partnership(LLP)',8 => 'OPC (One Person Company)',9 => 'Society',10 => 'Trust',11 => 'Private Limited Company'); - foreach ($general_form['companies'] as $comp_key => $ind_company) { - if($ind_company['is_company_applicant'] != null) - { - - echo ''. $ind_company['company_name'] .''. $ind_company['business_years']. (isset($ind_company['business_month']) ? ' . ' . $ind_company['business_month']: null) .''. ( $ind_company['business_entity_type'] == 1 ? $ind_company['business_entity_type_other'] : $business_entity_type_master[ $ind_company['business_entity_type'] ] ).' Not Applicable '; - } - - } - } + ?> @@ -3765,8 +3782,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $residence_text ='This is a '. $fmValue['residence_ownership'].' Family Information - Ownership of Residence residence, where the applicant has been staying for '. $fmValue['residence_No_of_years'].'Family Information - No of Yrs in current residence .'; $residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? ' The rent paid '.$rupee_symbol.' '.$fmValue['rent'].' per month.' : ''; - $clix_dependency_text = 'There are totally '.$fmValue['no_family_members_clix'].' family members'; - $clix_dependency_text .= isset($fmValue['no_dependents_clix']) && $fmValue['no_dependents_clix'] != 0 ? (' and ' . $fmValue['no_dependents_clix']. ' of them have dependencies on applicant.'): ' and no dependencies on applicant.'; + $clix_dependency_text = 'There are totally '.$fmValue['no_family_members_clix'].' family member(s)'; + $clix_dependency_text .= isset($fmValue['no_dependents_clix']) && $fmValue['no_dependents_clix'] != 0 ? (' and ' . $fmValue['no_dependents_clix']. ' of them have '. ( $fmValue['no_dependents_clix'] != 1 ? 'dependencies' : 'dependency') .' on applicant.'): ' and no dependencies on applicant.'; echo $intro_text;echo "

";echo $residence_text;echo "

";echo $clix_dependency_text; diff --git a/api/application/views/report_templates/JSONTOREPORT_RI.php b/api/application/views/report_templates/JSONTOREPORT_RI.php index a45f5d43..1424b159 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI.php @@ -964,7 +964,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $to_dispaly = !strcasecmp($loan_form['is_there_total_fund'], 'yes disclose') ? ('Disclosed '.""." ".MYUTIL::customIndianNumberFormat($loan_form['fund_amt']).' ('.MYUTIL::numtowords($loan_form['fund_amt']).')'):'Not Disclosed'; $loan_table_dispaly_rows[] = array('particulars' => 'Total Fund Requirement','details' => $to_dispaly); } - $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months'); + $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'] != "" ? $loan_form['loan_tenure'].' Months' : 'Not provided'); $end_use = ''; $to_remove_for = false;