From b93eb3c8f8592e6b6476de6827a3c2c83f43a259 Mon Sep 17 00:00:00 2001 From: Sanjeev Date: Tue, 25 May 2021 13:50:49 +0530 Subject: [PATCH] sal report changes : ps --- .../report_templates/JSONTOREPORT_SAL.php | 148 +++++++++++++++++- 1 file changed, 147 insertions(+), 1 deletion(-) diff --git a/api/application/views/report_templates/JSONTOREPORT_SAL.php b/api/application/views/report_templates/JSONTOREPORT_SAL.php index 4cd88608..900fac43 100644 --- a/api/application/views/report_templates/JSONTOREPORT_SAL.php +++ b/api/application/views/report_templates/JSONTOREPORT_SAL.php @@ -1137,7 +1137,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); 'both bank and cash','bank_transfer' => 'bank transfer','paid_in_cash' => 'cash'); if(isset($pd_processed_forms[12])) @@ -1218,6 +1218,152 @@ defined('BASEPATH') OR exit('No direct script access allowed'); //die(); + */ + + $employeement_data = array(); + $salary_mode_text = array('both_bank_transfer_cash' => 'both bank and cash','bank_transfer' => 'bank transfer','paid_in_cash' => 'cash'); + if(isset($pd_processed_forms[12])) + { + $employeement_data = json_decode($pd_processed_forms[12][0]['processed_json'],true); + } + //print_r($employeement_data); + echo "

Employment Information

" ; //die(); + if(count($employeement_data)) + { + if($employeement_data['was_met'] == 'yes') + { + $designation_of_person_met = $employeement_data['designation_person_met'] == 1 ? $employeement_data['others_person_met'] : $employeement_data['designation_person_met_master']; + echo '

During PD '.$employeement_data['name_person_met'] .' who is ('.$designation_of_person_met .') of the company/firm was met/contacted.

'; + } + else + { + echo '

During PD employer/Manager was not met/contacted.

'; + } + // print_r($employeement_data); + if(isset($employeement_data['photo_id_card'])){ + if ($employeement_data['photo_id_card'] == 'Not Provided'){ echo "

Person met/contacted has not provided ID Card

";} + else if($employeement_data['photo_id_card'] == 'Others'){ echo "

Person met/contacted provided ".$employeement_data['photo_id_others']." as ID Card.

"; } + else{echo "

Person met/contacted provided ".$employeement_data['photo_id_card']." as ID Card.

"; } + } + if($employeement_data['visiting_card'] == 'yes'){ echo '

Person met/contacted provided company ID Card/Visiting Card.

';} + else{ echo '

Person met/contacted was not provided company ID Card/Visiting Card.

'; } + echo "

Employer Name : ". explode('-', $employeement_data['employer_name'])[1] ."

" ; + echo "

Company Profile : ". $employeement_data['employer_in_brief'] ."

" ; + + echo "

The applicant has served ". $employeement_data['how_long_year'] ." Years ".($employeement_data['how_long_month'] ? ' and '.$employeement_data['how_long_month'].' months' : '' )." as employee in this firm / company. " ; + + echo "Applicant has total work experience of ". $employeement_data['total_business_experience']." years.

"; + + echo $employeement_data['total_business_previous_experience'] ? ("

Previously, applicant ".$employeement_data['total_business_previous_experience']) : ''; + + // echo $employeement_data['was_met'] == 'no'? "

No one was met at the visited premises who could confirm the employment details of loan applicant.

":"

During PD visit, ".$employeement_data['name_person_met'].' ( '. ($employeement_data['others_person_met'] ? $employeement_data['others_person_met'] : $employeement_data['designation_person_met_master']) .' ) was met at the visited premises.'; + + // echo ($employeement_data['confirm_salary'] == 'no'? '

Salary amount was not confirmed person met/contacted because '.$employeement_data['sal_amount_was_not_confirmed'].'

' : '

Salary amount confirmed by person met/contacted is '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).'.

'); + + + // echo $employeement_data['attendance_seen'] == 'no' ? "

Attendance Register was not seen during visit.

": "

Attendance register was seen during visit.

"; + + // echo $employeement_data['sal_reg_seen'] == 'no' ? "

Salary register was not seen during visit.

": "

Salary register was seen during visit.

"; + + + + + echo "

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

"; + if((isset($employeement_data['amount_paid_in_cash']) && $employeement_data['amount_paid_in_cash']) && (isset($employeement_data['amount_paid_through_bank']) && $employeement_data['amount_paid_through_bank'])) + { + echo "Applicant is getting ".$rupee_symbol.' '.$employeement_data['amount_paid_in_cash']." paid as cash and ".$rupee_symbol.' '.$employeement_data['amount_paid_through_bank']." as bank transfer."; + } + if(isset($employeement_data['bonus_incentive'])){ + if($employeement_data['bonus_incentive'] > 0){ + echo $employeement_data['bonus_incentive'] ? "

The applicant receives a bonus ( ".($employeement_data['bonus_type'] == 'others' ? $employeement_data['bonus_type_other']: $employeement_data['bonus_type']).") of ".$rupee_symbol." ".MYUTIL::customIndianNumberFormat($employeement_data['bonus_incentive'])." ".$employeement_data['bonus_frequency_master'].'.

': '

Applicant does not get any Bonus amount or Incentives.

'; + } + else{ + echo "Applicant does not get any Bonus amount or Incentives "; + } + } + + if(isset($employeement_data['sal_paid_regularly']) && $employeement_data['sal_paid_regularly'] == 'yes') + { + echo '

Salary has been paid regularly for last three months.

'; + } + else + { + echo '

Salary has been not paid regularly for last three months becasue '.$employeement_data['reason_not_sal_pay'].'.

' ; + } + + // else if(isset($employeement_data['amount_paid_in_cash']) && $employeement_data['amount_paid_in_cash']) + // { + // echo "entire salary is paid as cash."; + // } + // else if(isset($employeement_data['amount_paid_through_bank']) && $employeement_data['amount_paid_through_bank']) + // { + // echo "entire salary is paid as bank transfer."; + // } + + echo "

Applicant gets monthly gross salary of ". $rupee_symbol." ". MYUTIL::customIndianNumberFormat($employeement_data['gross_monthly_salary'])." and net monthly salary of ".$rupee_symbol." ". MYUTIL::customIndianNumberFormat($employeement_data['net_monthly_salary'])."

"; + + + // echo $employeement_data['check_validated'] == "not validated" ? "

The salary amount was not validated during visit because ".$employeement_data['why_was_it_not_validated']."

": "

The salary amount was validated during visit ".$employeement_data['how_was_it_validated']."

"; + + // echo $employeement_data['any_delays'] == 'yes' ? '

As per person met, sometimes there is delay in salary payment.

' : '

Generally, there is no delay in salary payment.

'; + + + // echo $employeement_data['bonus_incentive'] ? "

The applicant receives a bonus ( ".($employeement_data['bonus_type'] == 'others' ? $employeement_data['bonus_type_other']: $employeement_data['bonus_type']).") of ".$rupee_symbol." ".MYUTIL::customIndianNumberFormat($employeement_data['bonus_incentive'])." ".$employeement_data['bonus_frequency_master'].'.

': '

Applicant does not get any Bonus amount or Incentives.

'; + + echo $employeement_data['id_card_issued_company'] == 'yes' ? '

ID card issued by employer was seen by PD officer and same is available in zipped file enclosed with report.

' : '

ID card issued by employer was not seen because, '.$employeement_data['why_company_id_proof_not_available'].'

'; + //echo "
***********************************"; + + echo $employeement_data['employment_remarks'] != "" ? "

".$employeement_data['employment_remarks']."

": ""; + + echo "

Employment Document Sighted

" ; + $document_name = ''; + $document_name .= ($employeement_data['sal_reg_seen'] == 'yes' ? 'Salary Register, ': ''); + $document_name .= ($employeement_data['attendance_seen'] == 'yes' ? 'Attendance Register, ' : ''); + $document_name .= ($employeement_data['cash_voucher'] == 'yes'? 'Cash Voucher,' : ''); + $document_name .= ($employeement_data['sal_certificate'] == 'yes' ? 'Salary Certificate, ' : ''); + $document_name .= ($employeement_data['sal_slip'] == 'yes' ? 'Salary Slip, ': ''); + $document_name .= ($employeement_data['other_doc'] == 'yes' ? $employeement_data['other_doc_name'].', ' : ''); + + if($document_name != '') + { + $document_name = substr_replace($document_name,'', -2); + echo "

$document_name were seen during Field visit and photographs of same is available in zipped file enclosed with report.

"; + } + else + { + $reason = vendor_form::getSalNotConfirmedResons($employeement_data['docs_sighted']['doc_not_available'],(isset($employeement_data['docs_sighted']['doc_not_available_specify']) ? $employeement_data['docs_sighted']['doc_not_available_specify'] : '')); + $dis = '

Applicant’s employment documents were not seen during Field visit'; + if($reason) { $dis .= " becasue, $reason"; }; $reason .= '

.'; + echo $dis; + } + //******************old + // if(!$employeement_data['doc_not_available']) + // { + // echo '

Following documents sighted of applicant’s employment.

'; + // // foreach ($variable as $key => $value) + // // { + + // // } + // } + // else + // { + + // $doc_not_available_resan = ''; + // foreach ($employeement_data['doc_not_available'] as $dna_key => $dna_value) + // { + // $doc_not_available_resan .= $dna_value.', '; + // } + // //$doc_not_available_resan = $employeement_data['doc_not_available_specify'] ? ($doc_not_available_resan.', ') : $doc_not_available_resan; + // $doc_not_available_resan = $doc_not_available_resan ? ( substr_replace($doc_not_available_resan,' ',-2)) : ''; + + // $ids = '

Applicant’s employment documents were not seen'; + // if($doc_not_available_resan){$ids .= 'because '.$doc_not_available_resan;} + // $ids .= '

'; + // echo $ids; + // } + + } + ?>