diff --git a/api/application/config/constants.php b/api/application/config/constants.php index cd0017dc..895cc7aa 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -585,5 +585,8 @@ defined('PDDOCSTOBECOLLECTEDID') OR define('PDDOCSTOBECOLLECTEDID','pd_doc_to_be defined('ENTITYDISCLAIMER') OR define('ENTITYDISCLAIMER','m_entity_disclaimer'); defined('ENTITYDISCLAIMERID') OR define('ENTITYDISCLAIMERID','entity_disclaimer_id'); +defined('ENTITYFININSTITUTION') OR define('ENTITYFININSTITUTION','m_entity_fin_institutions'); +defined('ENTITYFININSTITUTIONID') OR define('ENTITYFININSTITUTIONID','entity_fin_institution_id'); + diff --git a/api/application/config/routes.php b/api/application/config/routes.php index b50f09e4..be90f673 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -147,6 +147,10 @@ $route['saveEntityPricingInfo'] = 'Entity_Management_Controller/saveEntityPricin $route['listEntityPricingInfo'] = 'Entity_Management_Controller/listEntityPricingInfo'; $route['saveEntityDisclaimer'] = 'Entity_Management_Controller/saveEntityDisclaimer'; $route['getEntityDisclaimer'] = 'Entity_Management_Controller/getEntityDisclaimer'; +$route['saveEntityFinInstitutions'] = 'Entity_Management_Controller/saveEntityFinInstitutions'; +$route['(getEntityFinInstitutions/:any)'] = 'Entity_Management_Controller/getEntityFinInstitutions'; +$route['saveEntityOtherPreferences'] = 'Entity_Management_Controller/saveEntityOtherPreferences'; +$route['getEntityOtherPreferences'] = 'Entity_Management_Controller/getEntityOtherPreferences'; //PD RELATED $route['triggerNewPD'] = 'PD_Controller/triggerNewPD'; diff --git a/api/application/controllers/Entity_Management_Controller.php b/api/application/controllers/Entity_Management_Controller.php index 56ef0999..3b9ff57c 100644 --- a/api/application/controllers/Entity_Management_Controller.php +++ b/api/application/controllers/Entity_Management_Controller.php @@ -881,6 +881,80 @@ class Entity_Management_Controller extends REST_Controller { } } + + + public function saveEntityFinInstitutions_post() + { + // ENTITYFININSTITUTION + $records = $this->post('records'); + $count = 0; + foreach($records as $key => $value) + { + if($value['entity_fin_institution_id'] != "" || $value['entity_fin_institution_id'] != null) + { + $id = $this->Entity_Management_Model->updateRecords($value,ENTITYFININSTITUTION,array('entity_fin_institution_id' => $value['entity_fin_institution_id'])); + if($id != '') { $count++; } + } + else + { + $id = $this->Entity_Management_Model->saveRecords($value,ENTITYFININSTITUTION); + if($id != '') { $count++; } + } + } + + if($count == count($records)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $count; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NO_CONTENT; + $data['msg'] = 'Something Went Wrong! Try Later'; + $this->response($data,REST_Controller::HTTP_OK); + } + } + public function getEntityFinInstitutions_get() + { + $entity_id = $this->uri->segment(2); + if($entity_id) + { + $institutions = $this->Entity_Management_Model->selectCustomRecords(array('*'),array('fk_entity_id' => $entity_id),ENTITYFININSTITUTION); + if(count($institutions)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $institutions; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NO_CONTENT; + $data['msg'] = 'No Records Found!'; + $this->response($data,REST_Controller::HTTP_OK); + } + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_BAD_REQUEST; + $this->response($data,REST_Controller::HTTP_OK); + } + } + + public function getEntityOtherPreferences_get() + { + + } + + public function saveEntityOtherPreferences_post() + { + + } -} \ No newline at end of file +} diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 87062aa6..e9bf48c2 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -5492,7 +5492,7 @@ public function getPDFormDetailsJSON_post() $satellite_script = str_replace('{{ADDRESS}}',$geo_location,$satellite_script); $satellite_script = str_replace('{{GEOLOCATION}}',$geo_location,$satellite_script); $satellite_script = str_replace('{{API_KEY}}',$google_map_static_api_key,$satellite_script); - + //echo $satellite_script;die(); file_put_contents(APPPATH.'/views/js/phantomsatellite.js',$satellite_script); @@ -5515,7 +5515,7 @@ public function getPDFormDetailsJSON_post() if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) { - $record_data = array('fk_pd_id' => $pdid,'pd_document_title'=>'satellite','pd_document_name'=>'satellite.png','fk_form_id'=>null,'is_show_report' =>$is_show_report,'rental_count_id' => null,'location' => null); + $record_data = array('fk_pd_id' => $pdid,'pd_document_title'=>'satellite','pd_document_name'=>'satellite.png','fk_form_id'=>null,'rental_count_id' => null,'location' => null); $id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS); $custom_log_info = '###CUSTOM DEBUG SATELLITE IMAGE STORED IN S3 DONE - '. $id; @@ -5693,7 +5693,7 @@ public function getPDFormDetailsJSON_post() { mkdir($this->external_path.'/pd_reports/'.$pdid,0761); } - + // $this->getSatelliteImage($pdid);die(); // for($i = 900;$i <= 1500;$i++) // { // //echo $this->external_path.'/pd_reports/'.$i; @@ -5833,8 +5833,8 @@ 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_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true)); - //die(); + print_r($data['pd_images']);//die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true)); + // die(); //echo "*******************************************"; if($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-RI') { @@ -7936,7 +7936,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() } } - + //echo $pd_master_details[0]['customer_segment_abbr'];die(); if($pd_master_details[0]['customer_segment_abbr'] == 'SE-AI' || $pd_master_details[0]['customer_segment_abbr'] == 'SE-DI') { #####Business Form Questions######## diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index e6650a4b..dfac3ed3 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -553,11 +553,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $temp_person_met['id_proof'] = ''; foreach($pd_images[18] as $pm_Key => $pm_value) { - if($applicant_name == $pm_value['pd_document_title'] ) + if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) ) { $temp_person_met['photo'] = $pm_value['doc_url'] ; } - if(($applicant_name.'-id_proof') == $pm_value['pd_document_title']) + + $id = trim($applicant_name).'-id_proof'; + if(!strcasecmp($id,trim($pm_value['pd_document_title']))) { $temp_person_met['id_proof'] = $pm_value['doc_url'] ; } @@ -606,7 +608,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } - + print_r($person_met_data);die(); echo '
'; echo '

Person(s) Met:

'; echo '
'; diff --git a/api/application/views/report_templates/JSONTOREPORT_RI.php b/api/application/views/report_templates/JSONTOREPORT_RI.php index d1601d5b..3c4a1f26 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI.php @@ -553,11 +553,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $temp_person_met['id_proof'] = ''; foreach($pd_images[18] as $pm_Key => $pm_value) { - if($applicant_name == $pm_value['pd_document_title'] ) + if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) ) { $temp_person_met['photo'] = $pm_value['doc_url'] ; } - if(($applicant_name.'-id_proof') == $pm_value['pd_document_title']) + + $id = trim($applicant_name).'-id_proof'; + if(!strcasecmp($id,trim($pm_value['pd_document_title']))) { $temp_person_met['id_proof'] = $pm_value['doc_url'] ; }