From bed481bceb025654f71cdfaee011d55640da4cff Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sat, 3 Oct 2020 14:36:31 +0530 Subject: [PATCH] SMART PD REPORT CHANGES --- .../helpers/vendor_form_helper.php | 4 ++ .../JSONTOREPORT_DI_AI_SMARTPD.php | 37 ++++++----- .../JSONTOREPORT_SAL_SMARTPD.php | 64 +++++++++++-------- 3 files changed, 62 insertions(+), 43 deletions(-) diff --git a/api/application/helpers/vendor_form_helper.php b/api/application/helpers/vendor_form_helper.php index 8d98bd61..dc4874d9 100644 --- a/api/application/helpers/vendor_form_helper.php +++ b/api/application/helpers/vendor_form_helper.php @@ -10,6 +10,10 @@ class vendor_form $return_data = 'During Field Visit, No one met at the visited premises.'; if($cus_type == 2) { + if($vendor_gen_section['is_employer_available'] == 'yes') + { + $return_data = 'During Field Visit, Employer was met.'; + } $return_data .= 'Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.'; } diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php index c9dabf5f..7f75f8e5 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_SMARTPD.php @@ -469,6 +469,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); padding: 5px; /*margin: 10px;*/ } + + +/*Vendor Section Bold Text Display*/ +.vsbtd{ +font-size: 14px; +font-weight: bolder;; +} /* ######### TOOLTIP CSS END ######### */ @@ -4781,14 +4788,14 @@ if($total_no_of_business > 0) { } $locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality']; - echo "

The Field Visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality']." and the estimated area of the ".$address_content['address_type']." is ".$vendor_address_section['estimated_area']." ". $address_content['uom'].". The location was ".$address_content['pd_location_approach'].". As Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; + echo "

The Field Visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality']." and the estimated area of the ".$address_content['address_type']." is ".$vendor_address_section['estimated_area']." ". $address_content['uom'].". The location was ".$address_content['pd_location_approach'].". As Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; echo '

Business information

'; $vendor_business_info = $vendor_form_json['questions'][2]['business_group'][0]; - echo $emp = $vendor_business_info['officer_total'] > 0 ? "

At the time of Field Visit , ".$vendor_business_info['officer_total']." employees sighted at the visited premises.

" : "

At the time of Field Visit, no employees sighted at the visited premises.

"; + echo $emp = $vendor_business_info['officer_total'] > 0 ? "

At the time of Field Visit , ".$vendor_business_info['officer_total']." employees sighted at the visited premises.

" : "

At the time of Field Visit, no employees sighted at the visited premises.

"; - echo $name_board = $vendor_business_info['was_the_company_name_board_sighted'] == 'yes' ? "

The Business Name board was seen at the visited premises.

" : "

The Business Name board was not seen at the visited premises.

"; + echo $name_board = $vendor_business_info['was_the_company_name_board_sighted'] == 'yes' ? "

The Business Name board was seen at the visited premises.

" : "

The Business Name board was not seen at the visited premises.

"; if(($vendor_business_info['documents_sighted'] == 'yes')) { @@ -4808,24 +4815,24 @@ if($total_no_of_business > 0) { } $vendor_business_asset_info = $vendor_form_json['questions'][2]['business_group'][1]; - echo $vendor_business_asset_info['business_is_pd_visited'] == 'yes' ? '

Business Activity was seen during Field visit

': '

Business Activity was not seen during Field Visit.

'; + echo $vendor_business_asset_info['business_is_pd_visited'] == 'yes' ? '

Business Activity was seen during Field visit

': '

Business Activity was not seen during Field Visit.

'; $vendor_stock_info = $vendor_form_json['questions'][2]['business_group'][2]; - echo $vendor_stock_info['is_stock_photo'] == 'yes' ? '

Stock was observed during Field visit and photographs available in zipped file enclosed with report.

': '

No Stock was observed during Field Visit.

'; + echo $vendor_stock_info['is_stock_photo'] == 'yes' ? '

Stock was observed during Field visit and photographs available in zipped file enclosed with report.

': '

No Stock was observed during Field Visit.

'; echo $vendor_business_asset_info['business_asset_sight'] == 'yes' ? '

Business Assets were sighted during Field visit and photographs available in zipped file enclosed with report.

': '

No Business Assets were sighted during Field Visit.

'; echo "

During Field visit, officer clicked office/Name board/Entrance photographs and same is available in zipped folder attached with report.

"; - echo '

Credit Manager Special Requests:


'; + echo '

Credit Manager Special Requests:


'; $vendor_credit_manager_info = $vendor_form_json['questions'][6]; if(count($vendor_credit_manager_info['docs_to_be_sighted'])) { foreach ($vendor_credit_manager_info['docs_to_be_sighted'] as $cm_key => $cm_value) { - echo 'Document Required:'.$cm_value['placeholder'].'
'; - echo 'Provided (Yes / No):'.ucfirst($cm_value[ $cm_value['control_name'] ] ); - echo isset($cm_value['reason']) ? '
Reason:'.$cm_value['reason'] : ''; + echo 'Document Required:'.$cm_value['placeholder'].'
'; + echo 'Provided (Yes / No):'.ucfirst($cm_value[ $cm_value['control_name'] ] ); + echo isset($cm_value['reason']) ? '
Reason:'.$cm_value['reason'] : ''; } } @@ -4892,14 +4899,14 @@ if($total_no_of_business > 0) { Submit:'; $vendoe_final_remars = $vendor_form_json['questions'][5]; - echo '

Final Status of Field Visit:'. $vendoe_final_remars['final_visit_status'] .'

'; - echo '

Remarks:'. $vendoe_final_remars['final_comments'] .'

'; + echo '

Final Status of Field Visit:'. $vendoe_final_remars['final_visit_status'] .'

'; + echo '

Remarks:'. $vendoe_final_remars['final_comments'] .'

'; echo '


'; - echo '

Name of the Officer visited:'.$pd_master_details[0]['vendor_pdofficer_name'].'

'; - echo '

Name of the Agency visited:'.$pd_master_details[0]['agency_name'].'

'; - echo '

Date & Time of visit:'.$pd_master_details[0]['pd_visit_date'].'

'; - echo '
'; + echo '

Name of the Officer visited:'.$pd_master_details[0]['vendor_pdofficer_name'].'

'; + echo '

Name of the Agency visited:'.$pd_master_details[0]['agency_name'].'

'; + echo '

Date & Time of visit:'.$pd_master_details[0]['pd_visit_date'].'

'; + // echo '
'; diff --git a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php index a401e0ed..5eca6499 100644 --- a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php @@ -465,6 +465,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); padding: 5px; /*margin: 10px;*/ } + + +/*Vendor Section Bold Text Display*/ +.vsbtd{ +font-size: 14px; +font-weight: bolder;; +} /* ######### TOOLTIP CSS END ######### */ @@ -666,15 +673,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); //if($display_for_person_met != "" || $display_for_person_met != null){ echo '

'; //} - // if($person['photo']) - // { - // echo ''; - // } - // echo '     '; - // if($person['id_proof']) - // { - // echo ''; - // } + if($person['photo']) + { + echo ''; + } + echo '     '; + if($person['id_proof']) + { + echo ''; + } //echo count($person_met_data) != ($pk+1)? '
':''; @@ -2015,6 +2022,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); '; $vendor_form_json = json_decode($pd_processed_forms[25][0]['json'],true); + // print_r($vendor_form_json['questions'][0]);die(); echo "

Field Visit Report of $main_applicant_name

"; echo '

General Section

'; $vendor_gen_section_text = vendor_form::getVendorGeneralSectionContent($vendor_form_json['questions'][0],2); @@ -2028,12 +2036,12 @@ defined('BASEPATH') OR exit('No direct script access allowed'); { $employer_details = $vendor_employer_info['employer_details']; $vendor_emp_master = vendor_form::getVendorEmpSectionContent($vendor_employer_info); - echo '

During Field visit,'. $employer_details['name_person_met'] .' ( '.substr_replace($vendor_emp_master,'',-3) .' ) was met at the visited premises.

'; - echo '

Employer’s/Manager’s Company ID card / Visiting Card was photographed during Field Visit.

'; - echo '

Salary amount was confirmed by person met during Field Visit. Applicant gets monthly gross salary of ₹ '.$employer_details['gross_monthly_salary'].' and net monthly salary of ₹'.$employer_details['net_monthly_salary'].'.

'; - echo '

Salary paid to the applicant between '. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).' of every month via '.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.

'; + echo '

During Field visit,'. $employer_details['name_person_met'] .' ( '.substr_replace($vendor_emp_master,'',-3) .' ) was met at the visited premises.

'; + echo '

Employer’s/Manager’s Company ID card / Visiting Card was photographed during Field Visit.

'; + echo '

Salary amount was confirmed by person met during Field Visit. Applicant gets monthly gross salary of '.$rupee_symbol." ".$employer_details['gross_monthly_salary'].' and net monthly salary of '.$rupee_symbol." ".$employer_details['net_monthly_salary'].'.

'; + echo '

Salary paid to the applicant between '. MYUTIL::addOrdinalNumberSuffix($employer_details['from_date_the_salary_is_rcv']).' to ' . MYUTIL::addOrdinalNumberSuffix($employer_details['to_date_the_salary_is_rcv']).' of every month via '.$salary_mode_text [ $employer_details['mode_of_getting_salary'] ].'.

'; $time = $employer_details['how_long_year'].' year(s)'; $time .= ($employer_details['how_long_year'] ? ' and '.$employer_details['how_long_year'] .' month(s)': ''); - echo '

During Field Visit, Employer confirmed that the applicant has served '.$time.' an employee in this firm / company.

'; + echo '

During Field Visit, Employer confirmed that the applicant has served '.$time.' an employee in this firm / company.

'; } else { @@ -2073,9 +2081,9 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo '

Credit Manager Special Requests:


'; foreach ($vendor_credit_manager_info['docs_to_be_sighted'] as $cm_key => $cm_value) { - echo 'Document Required:'.$cm_value['placeholder'].'
'; - echo 'Provided (Yes / No):'.ucfirst($cm_value[ $cm_value['control_name'] ] ); - echo isset($cm_value['reason']) ? '
Reason:'.$cm_value['reason'] : ''; + echo 'Document Required:'.$cm_value['placeholder'].'
'; + echo 'Provided (Yes / No):'.ucfirst($cm_value[ $cm_value['control_name'] ] ); + echo isset($cm_value['reason']) ? '
Reason:'.$cm_value['reason'] : ''; } } @@ -2092,18 +2100,18 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } $locality = preg_match("/^[aeiouAEIOU]/U", $address_content['comment_locality']) ? 'an '.$address_content['comment_locality'] : 'a '.$address_content['comment_locality']; - echo "

The Field Visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality'].".The location was ".$address_content['pd_location_approach'].". As Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; + echo "

The Field Visit was done at ".$address_content['address_type']." of the loan applicants. The ".$address_content['address_type']." is located in a ".$address_content['address_locality'].".The location was ".$address_content['pd_location_approach'].". As Per Officer, the ".$address_content['address_type']." is situated in $locality Locality.

"; // echo '

Submit:

'; $vendoe_final_remars = $vendor_form_json['questions'][5]; - echo '

Final Status of Field visit:'. $vendoe_final_remars['final_visit_status'] .'

'; - echo '

Remarks:'. $vendoe_final_remars['final_comments'] .'

'; - echo '

Neighbourhood check:

'; - echo '

Existence of organization/office confirmed by neighbour:'. ucfirst($vendoe_final_remars['company_existence_neighbour_confirmed']) .'

'; + echo '

Final Status of Field visit:'. $vendoe_final_remars['final_visit_status'] .'

'; + echo '

Remarks:'. $vendoe_final_remars['final_comments'] .'

'; + echo '

Neighbourhood check:

'; + echo '

Existence of organization/office confirmed by neighbour:'. ucfirst($vendoe_final_remars['company_existence_neighbour_confirmed']) .'

'; if($vendoe_final_remars['company_existence_neighbour_confirmed'] == 'yes') { - $time = '

Existence of organization/office confirmed by neighbour and is in existence for '.$vendoe_final_remars['company_existence_years'].' year(s).

'; - $time .= ( $vendoe_final_remars['company_existence_months'] ? $vendoe_final_remars['company_existence_months'].' month(s)' : ''); + $time = '

Existence of organization/office confirmed by neighbour and is in existence for '.$vendoe_final_remars['company_existence_years'].' year(s)'; + $time .= ( $vendoe_final_remars['company_existence_months'] ? '' . $vendoe_final_remars['company_existence_months'].' month(s).' : '.

'); echo $time; } else @@ -2113,10 +2121,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo '


'; - echo '

Name of the Officer visited:'.$pd_master_details[0]['vendor_pdofficer_name'].'

'; - echo '

Name of the Agency visited:'.$pd_master_details[0]['agency_name'].'

'; - echo '

Date & Time of visit:'.$pd_master_details[0]['pd_visit_date'].'

'; - echo '
'; + echo '

Name of the Officer visited:'.$pd_master_details[0]['vendor_pdofficer_name'].'

'; + echo '

Name of the Agency visited:'.$pd_master_details[0]['agency_name'].'

'; + echo '

Date & Time of visit:'.$pd_master_details[0]['pd_visit_date'].'

'; + // echo '
';