diff --git a/api/application/config/constants.php b/api/application/config/constants.php index e9db7d83..a2e48fc4 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -595,6 +595,8 @@ defined('ENTITYPREFERENCEID') OR define('ENTITYPREFERENCEID','entity_preference_ defined('APP_VERSION_INFO') OR define('APP_VERSION_INFO','m_app_version_info'); defined('APP_VERSION_INFOID') OR define('APP_VERSION_INFOID','version_info_id'); +defined('XTRA_CHECK') OR define('XTRA_CHECK','t_xtra_check'); + defined('D_GEN_RELATIONSHIP') OR define('D_GEN_RELATIONSHIP','d_gen_relationship'); defined('D_GENERAL_IND') OR define('D_GENERAL_IND','d_general_ind'); diff --git a/api/application/config/routes.php b/api/application/config/routes.php index a0d316b1..cb6f9534 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -220,7 +220,9 @@ $route['getPDScore'] = 'PD_Controller/getPDScoreForDisplay'; $route['savePDRemark'] = 'PD_Controller/savePDRemark'; $route['savePDDocsToBeCollected'] = 'PD_Controller/savePDDocsToBeCollected'; $route['getLenderContactPersons'] = 'PD_Controller/getLenderContactPersons'; +$route['getLenderContactPersons'] = 'PD_Controller/getLenderContactPersons'; $route['saveApplicantFromGeneralForm'] = 'PD_Controller/saveApplicantFromGeneralForm'; +$route['putSalCheck'] = 'PD_Controller/putSalCheck'; // $route['getPDFormDetailsJSON'] = 'PD_Controller/getPDFormDetailsJSON'; $route['smartyTestFunction'] = 'PD_Controller/smartyTestFunction'; @@ -238,7 +240,7 @@ $route['getCompaniesListsForBusiness'] = 'PD_Controller/getCompaniesListsFromGen $route['getPDImages'] = 'PD_Controller/getPDImages'; $route['deactiveFormData'] = 'PD_Controller/deactiveFormData'; $route['getNextRentalCount'] = 'PD_Controller/getNextRentalCount'; -$route['imgPDFDownload'] = 'PD_Controller/imgPDFDownload'; +$route['photoPDFDownload'] = 'PD_Controller/imgPDFDownload'; //$route['getTypeOfActivetyFromBusinessJSON'] = 'PD_Controller/getTypeOfActivetyFromBusinessJSON'; //Dashboard and Reports Related routes diff --git a/api/application/controllers/Entity_Management_Controller.php b/api/application/controllers/Entity_Management_Controller.php index 1b83c35c..a2f5f451 100644 --- a/api/application/controllers/Entity_Management_Controller.php +++ b/api/application/controllers/Entity_Management_Controller.php @@ -864,7 +864,7 @@ class Entity_Management_Controller extends REST_Controller { { $entity_id = $this->get('eid'); - $res = $this->Entity_Management_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $entity_id)); + $res = $this->Entity_Management_Model->selectCUstomRecords(array('*'),ENTITYDISCLAIMER,array('fk_entity_id' => $entity_id,'type' => 1)); if(count($res)) { $data['dataStatus'] = true; diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 0798673a..c853c3fe 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -385,7 +385,7 @@ class PD_Controller extends REST_Controller { $customer_segment_abbr = $customer_segment_abbr[0]['abbr']; //echo $customer_segment_abbr; - if( !strcasecmp($customer_segment_abbr,'SAL-CASH') || !strcasecmp($customer_segment_abbr,'SAL-CHQ')) + if( !strcasecmp($customer_segment_abbr,'SAL'))// || !strcasecmp($customer_segment_abbr,'SAL-CHQ')) { //SAL - (CASH/CHQ) $pd_details['fk_pd_template_id'] = 1; @@ -1138,7 +1138,7 @@ public function assignPDTempalate($data) { //echo "CHOOSE GENERIC "; - if( !strcasecmp($customer_segment_abbr,'SAL-CASH') || !strcasecmp($customer_segment_abbr,'SAL-CHQ')) + if( !strcasecmp($customer_segment_abbr,'SAL') ) // || !strcasecmp($customer_segment_abbr,'SAL-CHQ')) { //SAL - (CASH/CHQ) $templateid = 1; @@ -2093,15 +2093,17 @@ public function assignPDTempalate($data) $pd_id = ""; $client = ""; $random_string = ""; + $api = ""; if($this->get('pd_id')) { $pd_id = $this->get('pd_id'); } if($this->get('client')) { $client = $this->get('client'); } if($this->get('random_string')) { $random_string = $this->get('random_string'); } + if($this->get('api')) { $api = $this->get('api'); } if($pd_id != "" || $pd_id != null) { - $template_details = $this->PD_Model->getTemplateForPD($pd_id,$client,$random_string); + $template_details = $this->PD_Model->getTemplateForPD($pd_id,$client,$random_string,$api); if(count($template_details)) { $data['dataStatus'] = true; @@ -4636,7 +4638,7 @@ public function getPDFormDetailsJSON_post() //$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] ); $data['assessed_income_details'] = $this->getAssessedIncomeForPDReport($pdid); - if($data['pd_master_details'][0]['is_score_card_enabled'] != 0) + if($data['pd_master_details'][0]['is_score_card_enabled'] != 0 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL")) { $data['pd_score'] = $this->calculateScore($pdid); $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],1) : 0; @@ -4689,18 +4691,29 @@ public function getPDFormDetailsJSON_post() //Get Common Images $data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,'common',null,'report'); $temp = 'DEFAULT DATA'; - if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL')) - { - $temp = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true); - } - else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI') - { - $temp = $this->load->view('report_templates/JSONTOREPORT_RI',$data,true); - } - else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SEP_INDV') - { - $temp = $this->load->view('report_templates/JSONTOREPORT_DI_AI',$data,true); - } + // if(!count($add_on_pd)) + // { + if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'MWISE'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL')) + { + $t = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true); + } + else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI') + { + $t = $this->load->view('report_templates/JSONTOREPORT_RI',$data,true); + } + else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SEP_INDV') + { + $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI',$data,true); + } + else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL') + { + $t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true); + } + // } + // else + // { + // $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true); + // } $pd_report_time = date('Y-m-d-H-i-s'); @@ -4821,6 +4834,78 @@ public function getPDFormDetailsJSON_post() } + + public function imgPDFDownload_post() + { + $records = $this->post('records'); + $pdid = $records['pd_id']; + $random_string = $records['random_string']; + $pd_master_details = $this->PD_Model->getPDMasterDetails($pdid,$random_string); + + if(!file_exists($this->external_path.'/pd_reports/'.$pdid)) + { + mkdir($this->external_path.'/pd_reports/'.$pdid,0777); + } + + + $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; + $main_applicant_name = $pd_master_details[0]['main_applicant']; + + //get zip url from s3 if any + + $key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_images.pdf'; + + //$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes'); + if($pd_master_details[0]['is_img_pdf_created']) + { + $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes'); + + $response_data['dataStatus'] = true; + $response_data['status'] = REST_Controller::HTTP_OK; + $response_data['records'] = $singed_uri; + $this->response($response_data,REST_Controller::HTTP_OK); + } + else + { + + + $all_pd_images = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,null,null,'report'); + //print_r($all_pd_images);die(); + // $all_form_names = $this->PD_Model->selectCustomRecords(array('pd_form_id','pd_form_name'),array(),PDFORMS); + // $form_name = array(); + // foreach($all_form_names as $form) + // { + // $form_name[ $form['pd_form_id'] ] = $form['pd_form_name']; + // } + $data_to_view['all_pd_images'] = $all_pd_images; + $img_pdf_data = $this->load->view('report_templates/PDIMG_PDF',$data_to_view,true); + print_r($img_pdf_data);die(); + $bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path)); + + $s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data); + //print_r($s3result); + if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) + { + //$result_array[0]['content'] + $where_condition_array = array("pd_id" => $pdid); + $temp_array['is_zip_created'] = 1; + $id = $this->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array); + - unlink($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path); + } + + + + $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes'); + + $response_data['dataStatus'] = true; + $response_data['status'] = REST_Controller::HTTP_OK; + $response_data['records'] = $singed_uri; + $this->response($response_data,REST_Controller::HTTP_OK); + } + + + } + @@ -5700,7 +5785,7 @@ public function getPDFormDetailsJSON_post() //satellite_image::getSatelliteImage(886);die(); //echo $this->assignPDTempalate(1325);die(); //$this->getSatelliteImage(342);die();//velmurugan.s@venbainfotech.com - //PDALERTS::sendSalesPDMail($this,'vitvelz@gmail.com','PDGENIE TEST');die(); + //PDALERTS::pdnotification(1483);die(); //$this->load->helper('applicantname_grabber'); // print_r(APPLICANTNAME_GRABBER::getLatestApplicantsName(1390));die(); //satellite_image::getSatelliteImage(1442);die(); @@ -5809,6 +5894,8 @@ public function getPDFormDetailsJSON_post() //print_r($data['pd_master_details']);die(); //$data['satellite_path'] = $this->external_path.'/pd_reports/'. $pdid .'/satellite.png'; $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); + //print_r($data['lender_disclaimer']);die(); + //$GLOBALS['footer_lender_disclaimer'] = $data['lender_disclaimer'][0]['type'] == 2 ? $data['lender_disclaimer'][0]['disclaimer'] : (isset($data['lender_disclaimer'][1]) && $$data['lender_disclaimer'][1]['type'] == 2 ? $$data['lender_disclaimer'][1]['disclaimer'] : ''); $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid); $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly(); @@ -5820,7 +5907,7 @@ public function getPDFormDetailsJSON_post() //print_r($data['pd_master_details'][0]['is_score_card_enabled']);die(); // echo "**************************"; //$data['dsc_cards'] = $this->getDetailedScoreCardChart( $data['pd_score'] ); - if($data['pd_master_details'][0]['is_score_card_enabled'] == 1 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CASH" && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != '')) + if($data['pd_master_details'][0]['is_score_card_enabled'] == 1 && ($data['pd_master_details'][0]['customer_segment_abbr'] != "SAL"))// && $data['pd_master_details'][0]['customer_segment_abbr'] != "SAL-CHQ")) //&& ($data['pd_master_details'][0]['customer_segment_abbr'] != '')) { //echo $data['pd_master_details'][0]['is_score_card_enabled'].'-'.$data['pd_master_details'][0]['customer_segment_abbr'];die(); $data['pd_score'] = $this->calculateScore($pdid); @@ -5876,7 +5963,7 @@ public function getPDFormDetailsJSON_post() } //print_r(json_decode($data['pd_processed_forms'][18][0]['processed_json']));die(); $data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,'common',null,'report'); - //print_r($data['pd_processed_forms'][12]);//die(); + //print_r($data['pd_images']);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;} }); // print_r($it); @@ -5913,6 +6000,7 @@ public function getPDFormDetailsJSON_post() // print_r($data['add_on_pd_images']); // die(); + $t = ""; if(!count($add_on_pd)) { @@ -5928,7 +6016,7 @@ public function getPDFormDetailsJSON_post() { $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI',$data,true); } - else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL-CASH' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL-CHQ' ) + else if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SAL') { $t = $this->load->view('report_templates/JSONTOREPORT_SAL',$data,true); } @@ -5939,8 +6027,8 @@ public function getPDFormDetailsJSON_post() } //$t = $this->load->view('temp_html.html',null,true); echo $t; - // - //die(); + + die(); $total_replaces = substr_count($t,''); for($i = 0 ;$i < $total_replaces;$i++) @@ -8022,10 +8110,18 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() } } - - if(!$person_met_is_applicant_count){ $incomplete_details[] = 'General Section - Person met is not an applicant'; } - if(!$person_met_selfie_count){ $incomplete_details[] = 'General Section - Person met selfie image with PD officer not captured'; } - if(!$person_met_id_proof_count){ $incomplete_details[] = 'General Section - Person met ID proof image not captured'; } + + //get salary case details specifically + $sal_check = null; + if($pd_master_details[0]['customer_segment_abbr'] == 'SAL') + { + $sal_check = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' => $pdid),XTRA_CHECK); + $sal_check = count($sal_check) ? $sal_check[0]['flag'] : null; + } + + if(!$person_met_is_applicant_count && $sal_check == null){ $incomplete_details[] = 'General Section - Person met is not an applicant'; } + if(!$person_met_selfie_count && $sal_check == null){ $incomplete_details[] = 'General Section - Person met selfie image with PD officer not captured'; } + if(!$person_met_id_proof_count && $sal_check == null ){ $incomplete_details[] = 'General Section - Person met ID proof image not captured'; } #####End of General Form Questions######## @@ -8664,7 +8760,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() } }// end of CS - SE - else if($pd_master_details[0]['customer_segment_abbr'] == 'SAL-CASH' || $pd_master_details[0]['customer_segment_abbr'] == 'SAL-CHQ') + else if($pd_master_details[0]['customer_segment_abbr'] == 'SAL')// || $pd_master_details[0]['customer_segment_abbr'] == 'SAL-CHQ') { //have to check salary information form } @@ -9195,6 +9291,38 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $this->response($data,REST_Controller::HTTP_OK); } } + + + public function putSalCheck_post() + { + $records = $this->post('records'); + $id = null; + + if($records['id']) + { + $id = $this->PD_Model->updateRecords($records,XTRA_CHECK,array('id' => $records['id'])); + } + else + { + $id = $this->PD_Model->saveRecords($records,XTRA_CHECK); + } + + + if($id) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $id; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NOT_MODIFIED; + $data['msg'] = 'Something went wrong..! Try Later...!'; + $this->response($data,REST_Controller::HTTP_OK); + } + } } diff --git a/api/application/helpers/assetsform_helper.php b/api/application/helpers/assetsform_helper.php index d9dda971..d666ec18 100644 --- a/api/application/helpers/assetsform_helper.php +++ b/api/application/helpers/assetsform_helper.php @@ -219,13 +219,13 @@ public static function getOthersAssetsDetails($values,$pdid){ $sec_row .= $fetchVal['business_purchase_year'] != '' || $fetchVal['business_purchase_year'] != null ? ' purchased in '.$fetchVal['business_purchase_year'] .'' : ''; $third_row .= '
'. $footer_lender_disclaimer['disclaimer'] .'
'; + + // } +// ########################### End disclaimer end ######################################### +?> + + + +
Disclaimer: '. $lender_disclaimer[0]['disclaimer'] .'
'; + echo 'Disclaimer: '. $header_lender_disclaimer['disclaimer'] .'
'; } @@ -3814,7 +3845,7 @@ if($total_no_of_business > 0) {
| PD Initiated Date | : | '.$pd_master_details[0]['createdon'].' | '; + echo '|||||||
| PD Visit Date | : | '.$pd_master_details[0]['pd_visit_date'].' | |||||||
| PD Report Date | : | '.$pd_master_details[0]['pd_report_generated_date'].' | |||||||
| PD Initiated by | : | '.$pd_master_details[0]['branch_name'].' Branch | |||||||
| Loan Application ID | : | '.$pd_master_details[0]['lender_applicant_id'].' | |||||||
| Product | : | '.$pd_master_details[0]['product_name'].' | |||||||
| Customer Segment | : | '.(explode('-',$pd_master_details[0]['customer_segment_name'])[0]).' | |||||||
| 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']) .') |
Disclaimer: '. $lender_disclaimer[0]['disclaimer'] .'
'; + + } + + echo 'Registered / Corporate Office: SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002
'; + ?> + + + + + + $individual) + { + + if($individual['is_person_met'] == true) + { + //array_push($person_met_images); + $temp_person_met = array(); + $applicant_name = $individual['applicant_name']; + //echo 'Person(s) Met:
'; + echo ''.$person_met_details.'
'; + + //if($display_for_person_met != "" || $display_for_person_met != null){ + echo 'Loan Applicants:
+| Name | Age (Yrs/Mns) | Qualification / Type of Entity | Relationships |
|---|---|---|---|
| '.$title.' '.$applicant_name.$kyc_data.' | '.$individual['age'].' | '.$education_qualification.' | ';
+
+ $company_relationship_data = null;
+ //print_r($general_form['company_with_relationships']);
+ foreach($general_form['company_with_relationships'] as $company_with_relationship)
+ {
+
+ //print_r($company_with_relationship);
+ if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'])
+ {
+ //FInd Company Name from JSON
+
+ //echo "ONCE";
+ $company_relationship_data = ($company_with_relationship['company_relationship_master'] .' '.$company_with_relationship['company_name']);
+
+ $company_relationship_data.=' '; + } + } + + $personal_relationship_data = null; + foreach($general_form['persons_with_relationships'] as $persons_with_relationship) + { + + + + if(($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] || !strcasecmp($applicant_name,$persons_with_relationship['applicant_name']))&& isset($persons_with_relationship['relationship'])) + { + + + if( isset($persons_with_relationship['relation_to_master'])) + { + $RSNA = $persons_with_relationship['relation_to_master']; + if(isset($persons_with_relationship['relationship_master'])) + { + $personal_relationship_data .= $persons_with_relationship['relationship_master'] .' of '. $RSNA; + + $personal_relationship_data.=' '; + } + } + } + } + $company_relationship_data .= $personal_relationship_data; + echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, ' '),strlen($company_relationship_data)); + + 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 |
PD LOCATION
+ +Address at which PD was initiated: '.$pd_address['address'].', '.$pd_address['city_master'].', '.$pd_address['state_master'].' - '.$pincode.'.';
+
+ echo '
Address at which PD Visit actually done: '.$pd_alternative_address['alternative_address'].', '.$pd_alternative_address['city_master'].', '.$pd_alternative_address['state_master'].' - '.$alter_native_pincode.'.';
+
+ echo '
Reasaon for change in PD address:'.$pd_alternative_address['reason_for_alternative_address'];
+
+ }
+ else
+ {
+
+ echo 'PD Location Address : '.$pd_address['address'].', '.$pd_address['city_master'].', '.$pd_address['state_master'].' - '.$pincode.'.';
+ }
+
+ echo '
GPS Coordinates of location where PD Visit was done : '.$pd_master_details[0]['start_location'];
+ echo '
';
+ ?>
+ $com_value)
+ {
+ if($com_value['pd_document_title'] == 'satellite')
+ {
+ $satellite_url = $com_value['doc_url'];break;
+ }
+ }
+ }
+
+ ?>
+
+
+
+
+
+
| PD Location Approach | |
|---|---|
|
+
+ |
+ |
| '.$pd_location_approach_img_date; ?> |
Location Summary
+ '; + echo 'The PD visit was done at '. $address_type. 'Address Form - Type of Address of the loan applicants. '; + //echo 'The '.$address_type.'Address Form - Type of Address is '.$property_owner_type.'Business Assest Form - Owner of the Property and the business has been in operation from here for the last '.$yrs_being_run.'Business Assest Form - Business running Yrs in this premise .'; + echo 'LOAN DETAILS:
+ During the PD visit, person met provide the following information about loan applied for:'; + + $is_current_product_bl = $pd_master_details[0]['product_abbr'] == "BL" ? true: false; + $is_current_product_lab = $pd_master_details[0]['product_abbr'] == "LAP" ? true: false; + $is_current_product_laep = $pd_master_details[0]['product_abbr'] == "LAEP" ? true: false; + // echo $pd_master_details[0]['product_abbr']; + // echo '-bl-'. $is_current_product_bl; + // echo '-lap-'.$is_current_product_lab; + // die(); + $loan_table_dispaly_rows = array(); + + $loan_table_dispaly_rows[] = array('particulars' => 'Total Loan Amount applied for','details' => "₹"." ".$loan_amount.' ('.MYUTIL::numtowords($loan_form['loan_amount']).')'); + if($is_current_product_bl || $is_current_product_laep) + { + $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'] != "" ? $loan_form['loan_tenure'].' Months' : 'Not provided'); + + $end_use = ''; + $to_remove_for = false; + foreach($loan_form['end_use_master'] as $enduse) + { + if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';} + else { + + $to_remove_for = true; + $end_use.=$loan_form['end_use_other'].' and'; + } + } + $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'),strlen($end_use)); + //echo substr($end_use,0,3); + + + if(strcasecmp(substr($end_use,0,3),'for')) + { + if(!(count($loan_form['end_use_master']) == 1 && $to_remove_for)) + { + $end_use = 'For '.$end_use; + } + } + + $loan_table_dispaly_rows[] = array('particulars' => 'Loan Purpose','details' => $end_use); + + if(strcasecmp($loan_form['is_transfer'],'no')) + { + + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount','details' => "₹"." ".MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']).' ('.MYUTIL::numtowords($loan_form['balance_transfer_amount']).')'); + + $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for','details' => "₹"." ".MYUTIL::customIndianNumberFormat($loan_form['topup_amount']).($loan_form['topup_amount'] ? (' ('.MYUTIL::numtowords($loan_form['topup_amount']).')') : '') ); + + if($loan_form['end_use_topup_master']) + { + $loan_table_dispaly_rows[] = array('particulars' => 'End Use of Topup','details' => ( strcasecmp('others',$loan_form['end_use_topup_master'])) ? $loan_form['end_use_topup_master'] : $loan_form['other_end_use_topup'] ); + } + + + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender'] == 1 ? $loan_form['other_bt_lender']: $loan_form['lender_master']); + + } + else{ + //echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab); die(); + if((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep) + { + $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹"." ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' ); + $source_of_own_contribution = ''; + + foreach($loan_form['source_of_own_contribution_master'] as $own_source) + { + + if(!strcasecmp($own_source, 'others')) { $source_of_own_contribution.=$loan_form['other_source'].' and ';}else{ $source_of_own_contribution.= $own_source.' and '; } + } + $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution)); + + $loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution); + } + } + + $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emi_level']).' ('.MYUTIL::numtowords($loan_form['emi_level']).')' ); + + if(!$is_current_product_bl && !$is_current_product_laep) + { + + if(isset($loan_form['property_type_master']) && $loan_form['property_type_master'] != "") + { + $loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => substr_count($loan_form['property_type_master'],'Others') ? $loan_form['property_type_others'] : $loan_form['property_type_master']); + + $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; } + $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list)); + if($owners_list == '') + { + if(isset($loan_form['owner_name_group'][0]['owner_name'])) + { + $owners_list = $loan_form['owner_name_group'][0]['owner_name']['name']; + } + } + $loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list); + + $loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']); + + $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => ($loan_form['emv_per_customer'] != "" ? $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).' ('.MYUTIL::numtowords($loan_form['emv_per_customer']).')' : 'Not Provided')); + } + } + + if(isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') + { + $loan_table_dispaly_rows[] = array('particulars' => 'Current Owner/Seller of the property','details' => $loan_form['property_seller'] ); + + + } + + if(isset($loan_form['address']) && $loan_form['address'] != '') + { + $address_of_owner_seller_property = $loan_form['address'] . (isset($loan_form['city_master']) ? ', '.$loan_form['city_master'] : '') . (isset($loan_form['state_master']) ? ', '.$loan_form['state_master'] : '') . (isset($loan_form['pincode_master']) ? ', '.$loan_form['pincode_master'] : ''); + + $loan_table_dispaly_rows[] = array('particulars' => 'Address of the property','details' => $address_of_owner_seller_property ); + } + //print_r($loan_table_dispaly_rows); + ?> +| S.No | Loan Particulars | Loan Particular Details |
|---|---|---|
| '.($row_key + 1)." | ".$row['particulars']." | ".$row['details'] ." |
Employer Name : ". $employeement_data['employer_name'] ."
" ; + echo "Company Profile : ". $employeement_data['employer_in_brief'] ."
" ; + echo !($employeement_data['total_business_experience'] == $employeement_data['how_long_year'])? ("Out of ".$employeement_data['total_business_experience']." Yr(s) of total experience, t") :"
T";
+ echo "he 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." ;
+ echo $employeement_data['total_business_previous_experience'] ? ("
Previous Work Experience : ".$employeement_data['total_business_previous_experience']) : '';echo "
During PD visit, ". ($employeement_data['was_met'] == 'no'? 'the employer was not met.' : $employeement_data['name_person_met'].' '.$employeement_data['designation_person_met'] .' of the firm has been met'); + echo ($employeement_data['confirm_salary'] == 'no'? ' and salary amount was not confirmed because '.$employeement_data['sal_amount_was_not_confirmed'] : ' and '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($employeement_data['confirm_salary_amount']).' ('.(MYUTIL::numtowords($employeement_data['confirm_salary_amount'])).') was confirmed as salary.'); + if($employeement_data['attendance_seen'] == $employeement_data['sal_reg_seen'] ) + { + if($employeement_data['attendance_seen'] == 'no') + { + echo " During PD visit, both Attendance Register and Salary register were not seen.
"; + } + else + { + echo " During PD visit, both Attendance Register and Salary register were seen."; + } + } + else + { + echo " During PD visit, Attendance Register ".($employeement_data['attendance_seen'] == 'no'? ' was not seen ' : 'was seen ').' and '.($employeement_data['sal_reg_seen'] == 'no' ? 'Salary register was not seen. ': 'Salary register was seen .') .""; + } + + + echo "Salary is 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 as ".$salary_mode_text [ $employeement_data['mode_of_getting_salary'] ]." and "; + + 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 $rupee_symbol.' '.$employeement_data['amount_paid_in_cash']."(".MYUTIL::numtowords($employeement_data['amount_paid_in_cash']).") entire salary is paid as and ".$rupee_symbol.' '.$employeement_data['amount_paid_through_bank']."(".MYUTIL::numtowords($employeement_data['amount_paid_through_bank']).") as bank transfer"; + } + 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 ". $rupee_symbol."". MYUTIL::customIndianNumberFormat($employeement_data['gross_monthly_salary'])." (".MYUTIL::numtowords($employeement_data['gross_monthly_salary']).") monthly gross salary and ".$rupee_symbol."". MYUTIL::customIndianNumberFormat($employeement_data['net_monthly_salary'])." (".MYUTIL::numtowords($employeement_data['net_monthly_salary']).") monthly net salary."; + echo $employeement_data['net_monthly_salary'] == 'Yes' ? 'there is a delay in salary payment.' : 'Generally there is no delay in salary payment.'; + echo "
"; + + 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'])." ( " .MYUTIL::numtowords($employeement_data['bonus_incentive']).") "." ".$employeement_data['bonus_frequency'].'.': ''; + echo "
"; + echo "".$employeement_data['id_card_issued_company'] == 'yes' ? 'ID card issued by employer was seen by PD officer.(image attatched end of the report)': 'ID card issued by employer was not seen by PD officer.'."
"; + echo "Rental Income Details
'; + + foreach ($rental_data as $key => $value) { + + echo 'Multistorey Details:
'; + echo '| Floor Name | No of Units | Rent same for all Units | Unit Details | Total Rent Amount |
|---|---|---|---|---|
| '. $multistorey_value['floor_name'] .' | '. $multistorey_value['no_units_in_floor'] .' | '. $multistorey_value['same_rent'] .' | '. $multistorey_value['unit_details'] .' | '. $multistorey_value['total_floor_rent'] .' |
| Total | '. $rupee_symbol.' '.$value['unit_details']['multistorey_over_all_total'].' | |||
Unit Details:
'; + foreach ($value['unit_details']['property_core'] as $u_key => $unit_value) { + echo '| Sr.No | +Asset Type | +Asset Description | +Asset Owned By | +Approx Market Value(Rs) | +Age of the Assest | +Loan Again Assest | +
|---|---|---|---|---|---|---|
| + | + | + | + | '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : ( ($paRow['approximate_market_value'] != '' && $paRow['approximate_market_value'] != 0 ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']): 'Not Provided' )); ?> | ++ | + |
As per Loan applicant, he does not have any other assets.
+ '.$other_assest_common_remrks.''; } + + ?> + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'],true); + $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) + { + $is_personal_banking_available = 1; + if(count($individualBankRow['banking_details'])>0){ + $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult,$getIndividualEachValues); + + } + } + } + + + ?> +Below bank account details were shared :
+| Sr.No | +Account Holder's Name | +Bank Name | +Account Type | + +OD / CC Limit | +Vintage | +
|---|---|---|---|---|---|
| + | + | + | + + | + | + |
| Sr.No | +Income Source | +Earned by | +Amount(Rs) | +
|---|---|---|---|
| + | + | + + | + |
As per the loan applicants, they do not have any other source of Income.
+ '. $other_source_income_common_remarks.''; } + + ?> + + + + + $fRow) { + $familyRow = json_decode($fRow['processed_json'],true); + //print_r($familyRow);die(); + $other_family_form_common_remarks = $familyRow['family_details_form_remark']; + if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){ + $familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'],$pd_master_details[0]['pd_id']); + } + } + ?> + +' . $intro_text . '
';echo '' . $residence_text . '
'; + + ?> + + +The table below provides details of other family members of
+| Sr.No | +Name | +Relation | +Age | +Earning Status | +Occupation Details | +
|---|---|---|---|---|---|
| + | + | + | + | + | + |
Other Family Members is not available.
+ '.$other_family_form_common_remarks.''; } + + ?> + + + + + + $elRow) { + $otherLoanRow = json_decode($elRow['processed_json'],true); + $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; + $total_no_of_data = 0; + if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){ + $is_existing_loans_available = 1; + $total_no_of_data = count($otherLoanRow['loan_details']); + $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'],$pd_master_details[0]['pd_id']); + } + + } + ?> +| Particulars | + Loan $pre_loan_no"; } ?> +
|---|
As per loan applicant he does not have any existing loan obligations.
+ + '.$existing_loan_form_common_remarks.'';} + ?> + + + + + + + + + + $nrcRow) { + $neighbourRefRow = json_decode($nrcRow['processed_json'],true); + //print_r($applicants_details); + //print_r($neighbourRefRow);die(); + $neighbourhood_form_common_remarks = $neighbourRefRow['neighbour_reference_remark']; + if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){ + $pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status']; + if(count($neighbourRefRow['neighbourhood_list'])>0){ + $company_name = MYUTIL::findCompanyName($all_company_details,1,1); + + $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0],$applicants_details);//applicants_details comes from controller + } + } + // if(&& count($neighbourRefRow['referencecheck_list'])>0){ + // $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]); + // } + } + ?> + +Status of the check: could not verify.
+ + '. $neighbourhood_form_common_remarks.'
';} + ?> + + + + + '; + echo ''.$final_remark_data['market_intelligence'].'
'; + echo '|
+ Polite
+ |
+
+ Rude
+ |
+
+
+ Others*
+ |
+
+
|
+ Well Suited
+ |
+
+ Fairly Suited
+ |
+
+
+ Not Suited
+ |
+
|
+ Positive
+ |
+
+ Refer to Credit
+ |
+
+
+ Negative
+ |
+
+
+
+ Others*
+ |
+
+
PD officer recommendation is '.$fo_diplay.'.
';?>The following key points were considered while arriving at the aforementioned status.
+ "; foreach($final_remark_data['recommendation_positive'] as $pos){ echo "'.$pd_officer_final_remark.'
' + ?> + + '; + echo '| Photograph`s |
|---|
| '. $pd_images['common_images'][$i]['img_name'] .' | ';
+ }
+
+ //unset($p_key);
+ }
+ echo '

PD Photograph`s :
'; + echo '| ';
+ echo ' ';
+ echo ' ';
+ echo ''.$all_pd_images[$photo_iter]['pd_document_title'] .' ';
+ echo ' | ';
+ unset($all_pd_images[$photo_iter]);
+ }
+
+ }
+ //echo "