diff --git a/api/application/helpers/vendor_form_helper.php b/api/application/helpers/vendor_form_helper.php index 82cac0bd..2c0d3b39 100644 --- a/api/application/helpers/vendor_form_helper.php +++ b/api/application/helpers/vendor_form_helper.php @@ -7,37 +7,37 @@ class vendor_form { $CI =&get_instance(); $CI->load->model('PD_Model'); - $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.'; - } - - if($vendor_gen_section['person_met_entered']) - { - $return_data = ($cus_type == 1 ? $vendor_gen_section['person_met_entered']." ( ".$vendor_gen_section['designation_entered'] ." ) met at the visited address during Field Visit." : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit."); - } - else - { + + $is_applicant_not = false; foreach ($vendor_gen_section['individuals'] as $ind_key => $ind_value) { if($ind_value['is_person_met']) { - $return_data = "Applicant ".$ind_value['applicant_name']." was met at the visited address during Field Visit."; + $return_data = "Applicant ( ".$ind_value['applicant_name']." ) was met at the visited address during Field Visit."; + $is_applicant_not = true; break; } } - } + if($cus_type == 2 && !$is_applicant_not) + { + $return_data = "Applicant ( ".$vendor_gen_section['individuals'][0]['applicant_name']." ) was not met at the visited address during Field Visit."; + } - if($cus_type == 2) - { - $return_data .= 'Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.'; - } + if(!$is_applicant_not && $vendor_gen_section['is_met_during_visit'] && $vendor_gen_section['person_met_entered']) + { + $return_data = ($cus_type == 1 ? $vendor_gen_section['person_met_entered']." ( ".$vendor_gen_section['designation_entered'] ." ) met at the visited address during Field Visit." : $vendor_gen_section['person_met_entered']. " met at the visited address during Field Visit."); + } + else if(!$is_applicant_not) + { + $return_data = 'During Field Visit, No one met at the visited premises.'; + if($cus_type == 2) + { + $return_data .= 'Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.'; + } + } + + return $return_data; } diff --git a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php index fa8f5cd5..de39006d 100644 --- a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php @@ -2062,7 +2062,7 @@ font-weight: bolder;; echo ''; } ?> - + '; @@ -2084,8 +2084,11 @@ font-weight: bolder;; $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 '.$rupee_symbol." ".$employer_details['gross_monthly_salary'].' and net monthly salary of '.$rupee_symbol." ".$employer_details['net_monthly_salary'].'.

'; + + echo isset($employer_details['visiting_card']) && $employer_details['visiting_card'] == 'yes' ? '

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

' : '

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

'; + + echo isset($employer_details['confirm_salary']) && $employer_details['confirm_salary'] == 'yes' ? '

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'].'.

' : "

Salary amount was not confirmed because ".$employer_details['sal_amount_was_not_confirmed']."

"; + 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.

'; @@ -2124,6 +2127,11 @@ font-weight: bolder;; echo $dis; } + if((isset($vendor_employer_info['nameboard_photographs']) && count($vendor_employer_info['nameboard_photographs'])) || (isset($vendor_employer_info['office_photographs']) && count($vendor_employer_info['office_photographs']))) + { + echo '

Office/Name Board Photographs:

'; + echo '

Field Visit officer clicked Office/Name Board/Entrance photographs and same is available in zipped folder attached with report.

'; + } $vendor_credit_manager_info = $vendor_form_json['questions'][6]; if(count($vendor_credit_manager_info['docs_to_be_sighted'])) @@ -2155,7 +2163,7 @@ font-weight: bolder;; // echo '

Submit:

'; $vendoe_final_remars = $vendor_form_json['questions'][5]; - 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') @@ -2168,6 +2176,7 @@ font-weight: bolder;; { echo '

Existence of organization/office was not confirmed by neighbour.

'; } + echo '

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

'; echo '

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

'; echo '


';