diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 1897ad51..edce70e2 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -146,10 +146,15 @@ else if(ENVIRONMENT == 'production') /*************************TWILO CONSTANTS************************************************************/ -defined('TWLIO_SID') OR define('TWLIO_SID','AC01bf87391506e1df7e05cbe3d015bf81'); -defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN','470de1016b533c390703c40c7fea474b'); -defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY','SKfe779102ec62104c91e04b430152c612'); -defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET','D3GxJVFSuapFazTxU3P966ArukRQPVjY'); +// defined('TWLIO_SID') OR define('TWLIO_SID','AC01bf87391506e1df7e05cbe3d015bf81'); +// defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN','470de1016b533c390703c40c7fea474b'); +// defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY','SKfe779102ec62104c91e04b430152c612'); +// defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET','D3GxJVFSuapFazTxU3P966ArukRQPVjY'); + +defined('TWLIO_SID') OR define('TWLIO_SID','ACda3a92ada4f3d3aa8b8c36b816191f59'); +defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN','b0298b1d3bec5fc8e6811c8696f31212'); +defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY','SK59ae1e0155be36aa19e9aad07f0597a6'); +defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET','SjG8qZbfC0uRsx8QzvpECZ4yd483TpWC'); /*************************END OF TWILO CONSTANTS************************************************************/ diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index cbf7c7bc..fd7a5a54 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -6283,15 +6283,18 @@ public function getPDFormDetailsJSON_post() // print_r($this->db->last_query()); } //print_r(json_decode($data['pd_processed_forms'][25][0]['json'],true));die(); - - if($data['pd_master_details'][0]['customer_segment_abbr'] == "SAL" && $data['pd_master_details'][0]['fk_pd_type'] != 3) + //echo $data['pd_master_details'][0]['customer_segment_abbr'].$data['pd_master_details'][0]['fk_pd_type']; + // $data['pd_master_details'][0]['fk_pd_type'] = 3; + if($data['pd_master_details'][0]['customer_segment_abbr'] == "SAL" && $data['pd_master_details'][0]['fk_pd_type'] != 3)// && $data['pd_master_details'][0]['fk_pd_type'] != 1) { $data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,null,null,'report'); } else { $data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,'common',null,'report'); + } + // die(); //print_r(json_decode($data['pd_processed_forms'][24][0]['processed_json']));//die(); // $it = array_filter($data['pd_images'][11],function($d){ if($d['company_id'] == 2){ echo $d['company_id'].'TRUE';return 1;}else {echo $d['company_id'].'FALSE'; return 0;} }); @@ -10566,23 +10569,35 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() if($this->post('fk_entity_id')){ $where_condition_array['fk_entity_id'] = $this->post('fk_entity_id'); } if($this->post('fk_product_id')){ $where_condition_array['fk_product_id'] = $this->post('fk_product_id'); } if($this->post('pd_form_id')){ $where_condition_array['pd_form_id'] = $this->post('pd_form_id'); } + $fk_pd_id = $this->post('fk_pd_id'); //print_r($where_condition_array);die(); + $pd_master_details = $this->PD_Model->getPDMasterDetails($fk_pd_id); - $template = $this->PD_Model->selectCustomRecords(array('credit_pd_template_id', 'template_name', 'template_desc', 'template', 'fk_entity_id', 'fk_product_id', 'pd_form_id'),$where_condition_array,CREDITPDTEMPLATE); - - if(count($template)) + if($pd_master_details[0]['customer_segment_abbr'] != 'SAL') { - $data['dataStatus'] = true; - $data['status'] = REST_Controller::HTTP_OK; - $data['records'] = $template[0]; - $this->response($data,REST_Controller::HTTP_OK); + $template = $this->PD_Model->selectCustomRecords(array('credit_pd_template_id', 'template_name', 'template_desc', 'template', 'fk_entity_id', 'fk_product_id', 'pd_form_id'),$where_condition_array,CREDITPDTEMPLATE); + + if(count($template)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $template[0]; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_FOUND; + $data['msg'] = 'Template Not Found!'; + $this->response($data,REST_Controller::HTTP_OK); + } } else { - $data['dataStatus'] = false; - $data['status'] = REST_Controller::HTTP_NOT_FOUND; - $data['msg'] = 'Template Not Found!'; - $this->response($data,REST_Controller::HTTP_OK); + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_FOUND; + $data['msg'] = 'Template Not Found!'; + $this->response($data,REST_Controller::HTTP_OK); } } diff --git a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php index 5eca6499..ce29908c 100644 --- a/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php +++ b/api/application/views/report_templates/JSONTOREPORT_SAL_SMARTPD.php @@ -1151,27 +1151,37 @@ font-weight: bolder;; { $employeement_data = json_decode($pd_processed_forms[12][0]['processed_json'],true); } - //print_r($employeement_data); die(); + //print_r($employeement_data); + echo "

Employment Information

" ; //die(); if(count($employeement_data)) { - echo "

Employment Information

" ; - echo "

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

" ; - echo "

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

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

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

'; + } + else + { + echo '

During PD employer/Manager was not met/contacted.

'; + } + if($employer_details['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 "

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 "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['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['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 because '.$employeement_data['sal_amount_was_not_confirmed'].'

' : '

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

'); + 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['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 $employeement_data['sal_reg_seen'] == 'no' ? "

Salary register was not seen during visit.

": "

Salary register was seen during visit.

"; @@ -1199,12 +1209,27 @@ font-weight: bolder;; 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['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 $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

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

Following documents sighted of applicant’s employment.

'; + // foreach ($variable as $key => $value) + // { + + // } + } + else + { + echo '

Applicant’s employment documents were not seen because'.$employeement_data['doc_not_available_specify'].'

'; + } + } @@ -1699,7 +1724,7 @@ font-weight: bolder;; - +

Status of check: Could Not Verify.
Neighbour Check was not possible due to Could not verify

-->