PD REPORT FEEDBACK LOGS MOVED TO EXTERNAL PATH
This commit is contained in:
parent
4edd413186
commit
d3bfec93d7
@ -89,7 +89,7 @@ $autoload['drivers'] = array();
|
||||
|
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform');
|
||||
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
|
||||
@ -234,7 +234,8 @@ $config['log_threshold'] = 1;
|
||||
| application/logs/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['log_path'] = '';
|
||||
$config['external_data_path'] = $_SERVER['DOCUMENT_ROOT'].'/ssa_external_data/'.ENVIRONMENT;
|
||||
$config['log_path'] = $config['external_data_path'].'/ci_logs/';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@ -17,11 +17,16 @@ require APPPATH . 'vendor/autoload.php';
|
||||
class PD_Controller extends REST_Controller {
|
||||
//class PD_Controller extends CI_Controller {
|
||||
|
||||
|
||||
//class level variable declaration
|
||||
protected $external_path;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
|
||||
$this->external_path = $this->config->item('external_data_path');
|
||||
|
||||
$this->load->model('PD_Model');
|
||||
$this->load->library('AWS_S3');
|
||||
$this->load->library('AWS_SNS');
|
||||
@ -473,7 +478,7 @@ class PD_Controller extends REST_Controller {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
$pd_details['random_string'] = $randomString;
|
||||
$url = 'https://pdgenie.com/officertracking/#/officertracking/'.$randomString;
|
||||
$url = 'https://pdgenie.com/otnew/#/'.$randomString;
|
||||
/* $ch = curl_init();
|
||||
$timeout = 5;
|
||||
$url = 'https://ssa.sineedge.com/ot/#/officertracking/'.$randomString;
|
||||
@ -497,6 +502,13 @@ class PD_Controller extends REST_Controller {
|
||||
/***********************PD DOCUMENTS UPLOAD SECTION FROM WEB***********/
|
||||
if($pd_id != null || $pd_id != '')
|
||||
{
|
||||
|
||||
//If PD created sucessfully then create a externa folder named with pd_id
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pd_id))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pd_id,0777);
|
||||
}
|
||||
|
||||
if(!empty($_FILES['pddocuments']) && !empty($pd_document_titles))
|
||||
{
|
||||
@ -527,6 +539,10 @@ class PD_Controller extends REST_Controller {
|
||||
if($pd_id != null || $pd_id != '')
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($pd_applicant_details != "" || $pd_applicant_details != null)
|
||||
{
|
||||
foreach($pd_applicant_details as $pd_applicant_detail)
|
||||
@ -721,6 +737,13 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$exist_pd_details = $this->PD_Model->getPDMasterDetails($pd_details['pd_id']);
|
||||
//print_r($exist_pd_details);
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pd_details['pd_id']))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pd_details['pd_id'],0777);
|
||||
}
|
||||
|
||||
|
||||
if(isset($pd_details['pd_status']) && $pd_details['pd_status'] == INITIATED)
|
||||
{
|
||||
|
||||
@ -3966,6 +3989,12 @@ class PD_Controller extends REST_Controller {
|
||||
$is_generate = isset($records['is_generate']) ? 1 : 0;
|
||||
$random_string = $records['random_string'];
|
||||
$is_qc_edited = 0;
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pdid,0777);
|
||||
}
|
||||
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($pdid,$random_string);
|
||||
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
@ -3983,7 +4012,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
//Get Latest PD Report Html file and convert it into PDF
|
||||
$latest_pd_report_html_file_name = $pd_master_details[0]['pd_report_html_filename'];
|
||||
$latest_pd_report_html_file_path = APPPATH.'views/pd_reports/'.$pdid.'/'.$latest_pd_report_html_file_name.'.html';
|
||||
$latest_pd_report_html_file_path = $this->external_path.'/pd_reports/'.$pdid.'/'.$latest_pd_report_html_file_name.'.html';
|
||||
$temp = file_get_contents($latest_pd_report_html_file_path);
|
||||
|
||||
//Replace Span tags from HTML File
|
||||
@ -4012,7 +4041,7 @@ class PD_Controller extends REST_Controller {
|
||||
//PDF Gen using DOM PDF
|
||||
$pdf_doc = $this->pdfgenerator->generate($temp, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file2 = APPPATH."/docs/sample.pdf";
|
||||
$output_file2 = $this->external_path."/pd_reports/". $pdid ."/sample.pdf";
|
||||
$bytes = file_put_contents($output_file2, $pdf_doc);
|
||||
|
||||
if(file_put_contents($output_file2, $pdf_doc))
|
||||
@ -4093,6 +4122,12 @@ class PD_Controller extends REST_Controller {
|
||||
$fk_createdby = $records['fk_createdby'];
|
||||
$random_string = $records['random_string'];
|
||||
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pdid,0777);
|
||||
}
|
||||
|
||||
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid,$random_string);
|
||||
$data['pd_master_details'][0]['pd_report_generated_date'] = date('d/m/Y g:i:s A');
|
||||
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
|
||||
@ -4109,7 +4144,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$exact_script = $phantom_script[0]['script_content'];
|
||||
//print_r($exact_script);
|
||||
$apppath = str_replace('\\','/',APPPATH);
|
||||
$apppath = str_replace('\\','/',$this->external_path.'/pd_reports/'.$pdid);
|
||||
$exact_script = str_replace('{{APPPATH}}',$apppath,$exact_script);
|
||||
$exact_script = str_replace('{{place_score_here}}',$score_for_chart,$exact_script);
|
||||
//print_r($exact_script);die();
|
||||
@ -4124,7 +4159,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//print_r($ou);
|
||||
|
||||
$chart_img_path = APPPATH.'/views/report_templates/chart.png';
|
||||
$chart_img_path = $this->external_path.'/pd_reports/'. $pdid .'/chart.png';
|
||||
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
|
||||
$chart_img_content = file_get_contents($chart_img_path);
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
|
||||
@ -4149,12 +4184,9 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
$temp = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
//Save Report as HTML Version with timestamp
|
||||
if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) {
|
||||
$dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE);
|
||||
}
|
||||
|
||||
$pd_report_time = date('Y-m-d-H-i-s');
|
||||
$pd_report_store = APPPATH.'views/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
|
||||
$pd_report_store = $this->external_path.'/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
|
||||
$is_write_done = file_put_contents($pd_report_store,$temp);
|
||||
|
||||
if($is_write_done)
|
||||
@ -4191,6 +4223,12 @@ class PD_Controller extends REST_Controller {
|
||||
$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'];
|
||||
|
||||
@ -4236,9 +4274,9 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$temp_path = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
|
||||
|
||||
$this->zip->archive(APPPATH.'docs/'.$temp_path);
|
||||
$this->zip->archive($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>(APPPATH.'docs/'.$temp_path));
|
||||
$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);
|
||||
@ -4248,7 +4286,7 @@ class PD_Controller extends REST_Controller {
|
||||
$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(APPPATH.'docs/'.$temp_path);
|
||||
- unlink($this->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
}
|
||||
|
||||
|
||||
@ -4910,7 +4948,11 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$pdid = $pd_id;
|
||||
$logger = MYLOG::logFunction();
|
||||
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pdid,0777);
|
||||
}
|
||||
$pdmas = $this->PD_Model->getPDMasterDetails($pdid);
|
||||
//print_r($pdmas);
|
||||
//load satellite script from db
|
||||
@ -4918,7 +4960,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => SATELLITE_IMAGE_LOCATION),SCRIPTS);
|
||||
$satellite_script = $satellite_script_from_db[0]['script_content'];
|
||||
|
||||
|
||||
|
||||
//Get Address Data
|
||||
|
||||
@ -4938,7 +4980,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//Replacing Place holders
|
||||
|
||||
$apppath = str_replace('\\','/',APPPATH);
|
||||
$apppath = str_replace('\\','/',$this->external_path.'/pd_reports/'.$pdid);
|
||||
$satellite_script = str_replace('{{APPPATH}}',$apppath,$satellite_script);
|
||||
$satellite_script = str_replace('{{ADDRESS}}',$geo_location,$satellite_script);
|
||||
$satellite_script = str_replace('{{GEOLOCATION}}',$geo_location,$satellite_script);
|
||||
@ -4954,7 +4996,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
|
||||
// //convert as base 64 image.
|
||||
$satellite_image_png_path = APPPATH.'/views/report_templates/satellite.png';
|
||||
$satellite_image_png_path = $this->external_path.'/pd_reports/'. $pdid .'/satellite.png';
|
||||
$type = pathinfo($satellite_image_png_path, PATHINFO_EXTENSION);
|
||||
$satellite_img_content = file_get_contents($satellite_image_png_path);
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($satellite_img_content);
|
||||
@ -5117,11 +5159,22 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$records = $this->post('records');
|
||||
$pdid = $records['pd_id'];
|
||||
|
||||
//$external_path = $this->config->item('external_data_path');
|
||||
|
||||
if(!file_exists($this->external_path.'/pd_reports/'.$pdid))
|
||||
{
|
||||
mkdir($this->external_path.'/pd_reports/'.$pdid,0761);
|
||||
}
|
||||
|
||||
// $this->load->helper('push_notification');
|
||||
// PUSH_NOTIFICATION::notifyWeb('fbm57p_E5xc:APA91bENk6ZH7J2kj03liCy0FzrtsYUgVjvoYnPBi4bu4UtGjqixn0Z_cUDHjCHeBWNcXlVozoo_uUKr8gwufcOQMfdRK19_sWN9jA5U1hRuwJTpIQKows6wYSHFH7kI4EnnUaj0FtK_','EST','test mesg from server',1);die();
|
||||
|
||||
|
||||
//echo APPPATH;
|
||||
// $path = $_SERVER['DOCUMENT_ROOT'].'/ssa_external_data';
|
||||
// echo $path;
|
||||
// echo file_exists($path);
|
||||
// EXTERNAL_DIR_CHECK::checkExternalDirectory();
|
||||
// die();
|
||||
// $external_path = substr(APPPATH,0,strpos(APPPATH,'sparq'));
|
||||
// echo $external_path;
|
||||
// $external_path .= 'dev_external_data/sample/sample.html';
|
||||
@ -5188,7 +5241,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
//print_r($ou);
|
||||
|
||||
$chart_img_path = APPPATH.'/views/report_templates/chart.png';
|
||||
$chart_img_path = $this->external_path.'/pd_reports/'. $pdid .'/chart.png';
|
||||
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
|
||||
$chart_img_content = file_get_contents($chart_img_path);
|
||||
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
|
||||
@ -5252,7 +5305,7 @@ class PD_Controller extends REST_Controller {
|
||||
//$this->pdfgenerator->setEncryption('test1234');
|
||||
$pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file2 = APPPATH."/docs/sample.pdf";
|
||||
$output_file2 = $this->external_path ."/pd_reports/" . $pdid . "/sample.pdf";
|
||||
$ti = file_put_contents($output_file2, $pdf_doc);
|
||||
echo $ti; die();
|
||||
$dat['dataStatus'] = true;
|
||||
@ -6260,7 +6313,8 @@ class PD_Controller extends REST_Controller {
|
||||
$temp_base64_string = $doc['image'];
|
||||
$title = $doc['Name'];
|
||||
$is_show_report = isset($doc['is_show_report']) ? $doc['is_show_report'] : null;
|
||||
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
|
||||
//$external_path = $this->config->item('external_data_path');
|
||||
$output_file = $this->external_path."/pd_reports/". $pd_id ."/temp_base64_image.jpeg";
|
||||
|
||||
//Generate Random File Name
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
@ -6466,7 +6520,7 @@ class PD_Controller extends REST_Controller {
|
||||
// 3 - QNO(2.1) - No of Years Business Run
|
||||
if(array_key_exists('companies',$general_form))
|
||||
{
|
||||
$score_questions['business']['no_of_years_business_run'] = $general_form['companies'][0]['business_years'];
|
||||
$score_questions['business']['no_of_years_business_run'] = isset($general_form['companies'][0]['business_years']) ? $general_form['companies'][0]['business_years'] : 0;
|
||||
}
|
||||
#####End of General Form Questions########
|
||||
|
||||
@ -6604,7 +6658,7 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
|
||||
|
||||
if($manu_value['manufacturing_raw_material_name'] != "" && $manu_value['manufacturing_supplier_name'] != "" && $manu_value['manufacturing_contact_person_name'] != "" && ($manu_value['manufacturing_contact_person_mobile_number'] != "" || $manu_value['person_landline'] != ""))
|
||||
if($manu_value['manufacturing_raw_material_name'] != "" && $manu_value['manufacturing_supplier_name'] != "" )
|
||||
{
|
||||
$supplier_count ++;
|
||||
}
|
||||
@ -6621,7 +6675,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
foreach ($supplier_form['trade_details'][0]['trading_products'] as $trading_key => $trading_value)
|
||||
{
|
||||
if($trading_value['trade_product_name'] != "" && $trading_value['trade_supplier_name'] != "" && $trading_value['trade_product_contact_person_name'] != "" && ($trading_value['trade_product_contact_person_mobile_number'] != "" || $trading_value['person_landline'] != ""))
|
||||
if($trading_value['trade_product_name'] != "" && $trading_value['trade_supplier_name'] != "" )
|
||||
{
|
||||
$supplier_count ++;
|
||||
}
|
||||
@ -6638,7 +6692,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
foreach ($supplier_form['servicing_details'][0]['service_providers'] as $serivce_key => $service_value)
|
||||
{
|
||||
if($service_value['service_provider_name'] != "" && $service_value['service_provider_supplier_name'] != "" && $service_value['service_provider_contact_person_name'] != "" && ($service_value['service_provider_contact_person_mobile_number'] != "" || $service_value['person_landline'] != ""))
|
||||
if($service_value['service_provider_name'] != "" && $service_value['service_provider_supplier_name'] != "" )
|
||||
{
|
||||
$supplier_count ++;
|
||||
}
|
||||
@ -6680,7 +6734,7 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
foreach ($client_form['manufacturing_details'][0]['main_raw_materials'] as $key => $value)
|
||||
{
|
||||
if($value['manufacturing_product_name'] != "" && $value['manufacturing_client_name'] != "" && $value['manufacturing_contact_person_name'] != "" && ($value['manufacturing_contact_person_mobile_number'] != "" || $value['person_landline'] != ""))
|
||||
if($value['manufacturing_product_name'] != "" && $value['manufacturing_client_name'] != "" )
|
||||
{ $client_count++; }
|
||||
}
|
||||
}
|
||||
@ -6695,7 +6749,7 @@ class PD_Controller extends REST_Controller {
|
||||
foreach ($client_form['trade_details'][0]['trading_products'] as $key => $value)
|
||||
{
|
||||
//print_r($value);die();
|
||||
if($value['trade_product_name'] != "" && (isset($value['trade_client_name'])) && $value['trade_client_name'] != "" && $value['trade_product_contact_person_name'] != "" && ($value['trade_product_contact_person_mobile_number'] != "" || $value['person_landline'] != ""))
|
||||
if($value['trade_product_name'] != "" && (isset($value['trade_client_name'])) && $value['trade_client_name'] != "" )
|
||||
{
|
||||
$client_count++;
|
||||
}
|
||||
@ -6712,7 +6766,7 @@ class PD_Controller extends REST_Controller {
|
||||
foreach ($client_form['service_provider_details'][0]['service_products'] as $key => $value)
|
||||
{
|
||||
|
||||
if($value['service_provider_product_name'] != "" && $value['service_provider_client_name'] != "" && $value['service_provider_product_contact_person_name'] != "" && ($value['service_provider_product_contact_person_mobile_number'] != "" || $value['person_landline'] != ""))
|
||||
if($value['service_provider_product_name'] != "" && $value['service_provider_client_name'] != "" )
|
||||
{ $client_count++; }
|
||||
|
||||
}
|
||||
@ -7262,6 +7316,26 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
#####End of Business Assets Form Questions########
|
||||
|
||||
$business_bank_form = isset($form_data[21][0]['processed_json'])?(json_decode($form_data[21][0]['processed_json'],true)):array();
|
||||
if(count($business_bank_form))
|
||||
{
|
||||
$not_available_count = 0;
|
||||
if(isset($business_bank_form['banking_details']) && count($business_bank_form['banking_details']))
|
||||
{
|
||||
foreach ($business_bank_form['banking_details'] as $business_acc_key => $business_acc_value) {
|
||||
if(!strcasecmp($business_acc_value['is_main'],'Yes') && ($business_acc_value['vintage_year'] == '' || $business_acc_value['vintage_year'] == ''))
|
||||
{
|
||||
$not_available_count++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if($not_available_count)
|
||||
{
|
||||
$incomplete_details[] = 'Business Banking Form - Vintage of the Main Business AC info missing';
|
||||
}
|
||||
}
|
||||
if($client != 'WEB')
|
||||
{
|
||||
|
||||
@ -7314,7 +7388,7 @@ class PD_Controller extends REST_Controller {
|
||||
// $incomplete_details[] = 'Supplier Section - '.$supplier_name.' - Images Not Found';
|
||||
// }
|
||||
}
|
||||
else if($manu_value['manufacturing_raw_material_name'] == "" || $manu_value['manufacturing_supplier_name'] == "" || $manu_value['manufacturing_contact_person_name'] != "" || ($manu_value['manufacturing_contact_person_mobile_number'] == "" || $manu_value['person_landline'] == ""))
|
||||
else if($manu_value['manufacturing_raw_material_name'] == "" || $manu_value['manufacturing_supplier_name'] == "" )
|
||||
{
|
||||
$insufficient_supplier_info++;
|
||||
}
|
||||
@ -7364,7 +7438,7 @@ class PD_Controller extends REST_Controller {
|
||||
// $incomplete_details[] = 'Supplier Section - '.$supplier_name.' - Images Not Found';
|
||||
// }
|
||||
|
||||
else if($trading_value['trade_product_name'] == "" || $trading_value['trade_supplier_name'] == "" || $trading_value['trade_product_contact_person_name'] != "" || ($trading_value['trade_product_contact_person_mobile_number'] == "" || $trading_value['person_landline'] == ""))
|
||||
else if($trading_value['trade_product_name'] == "" || $trading_value['trade_supplier_name'] == "" )
|
||||
{
|
||||
$insufficient_supplier_info++;
|
||||
}
|
||||
@ -7413,7 +7487,7 @@ class PD_Controller extends REST_Controller {
|
||||
// $incomplete_details[] = 'Supplier Section - '.$supplier_name.' - Images Not Found';
|
||||
// }
|
||||
|
||||
else if($service_value['service_provider_name'] == "" || $service_value['service_provider_supplier_name'] == "" || $service_value['service_provider_contact_person_name'] == "" || ($service_value['service_provider_contact_person_mobile_number'] == "" || $service_value['person_landline'] == ""))
|
||||
else if($service_value['service_provider_name'] == "" || $service_value['service_provider_supplier_name'] == "" )
|
||||
{
|
||||
$insufficient_supplier_info++;
|
||||
}
|
||||
@ -7490,7 +7564,7 @@ class PD_Controller extends REST_Controller {
|
||||
// }
|
||||
|
||||
}
|
||||
else if($value['manufacturing_product_name'] == "" || $value['manufacturing_client_name'] == "" || $value['manufacturing_contact_person_name'] == "" || ($value['manufacturing_contact_person_mobile_number'] == "" || $value['person_landline'] == ""))
|
||||
else if($value['manufacturing_product_name'] == "" || $value['manufacturing_client_name'] == "" )
|
||||
{
|
||||
$insufficient_client_info++;
|
||||
}
|
||||
@ -7535,7 +7609,7 @@ class PD_Controller extends REST_Controller {
|
||||
// $incomplete_details[] = 'Client Section - '.$client_name .'- Images Not Found';
|
||||
// }
|
||||
}
|
||||
else if($value['trade_product_name'] == "" || (isset($value['trade_client_name'])) || $value['trade_client_name'] == "" || $value['trade_product_contact_person_name'] == "" || ($value['trade_product_contact_person_mobile_number'] == "" || $value['person_landline'] == ""))
|
||||
else if($value['trade_product_name'] == "" || (isset($value['trade_client_name'])) || $value['trade_client_name'] == "" )
|
||||
{
|
||||
$insufficient_client_info++;
|
||||
}
|
||||
@ -7580,7 +7654,7 @@ class PD_Controller extends REST_Controller {
|
||||
// }
|
||||
|
||||
}
|
||||
else if($value['service_provider_product_name'] == "" || $value['service_provider_client_name'] == "" || $value['service_provider_product_contact_person_name'] == "" || ($value['service_provider_product_contact_person_mobile_number'] == "" || $value['person_landline'] == ""))
|
||||
else if($value['service_provider_product_name'] == "" || $value['service_provider_client_name'] == "" )
|
||||
{
|
||||
$insufficient_client_info++;
|
||||
}
|
||||
|
||||
59
api/application/helpers/external_dir_check_helper.php
Normal file
59
api/application/helpers/external_dir_check_helper.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
class EXTERNAL_DIR_CHECK
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Create the logger
|
||||
public static function checkExternalDirectory() //$msg,$data,$log_type
|
||||
{
|
||||
//echo 'EXTERNAL_DIR_CHECK called';
|
||||
$path = $_SERVER['DOCUMENT_ROOT'].'/ssa_external_data';
|
||||
if(!file_exists($path))
|
||||
{
|
||||
mkdir($path,0761);
|
||||
}
|
||||
|
||||
$path .='/'.ENVIRONMENT;
|
||||
if(!file_exists($path))
|
||||
{
|
||||
mkdir($path,0761);
|
||||
}
|
||||
|
||||
$array = array($path.'/ci_logs',$path.'/api_request_logs',$path.'/app_logs',$path.'/pd_reports');
|
||||
foreach ($array as $key => $value)
|
||||
{
|
||||
if(!file_exists($value))
|
||||
{
|
||||
mkdir($value,0761);
|
||||
}
|
||||
}
|
||||
|
||||
// $fp = fopen($path.'/ci_logs/sample.html','a');
|
||||
// $data = '<h1>WELCOME</h1>';
|
||||
// fwrite($fp, $data);
|
||||
// $data = '<h2>DSKFHLKSDFNSLDKN</h2>';
|
||||
// fwrite($fp, $data);
|
||||
// fclose($fp);
|
||||
// $str = file_get_contents($path.'/ci_logs/sample.html');
|
||||
// echo $str;
|
||||
|
||||
// $log = MYLOG::logFunction2($path.'/ci_logs');
|
||||
// $log->info('EXTERNAL LOG IINFO',array(1,2));
|
||||
// $log->error('EXTERNAL LOG ERROR',array(3,4));
|
||||
// $CI =& get_instance();
|
||||
// echo $CI->config->item('log_path');
|
||||
// log_message('error','Hi this');
|
||||
// $CI->config->set_item('log_path', $path.'/api_request_logs');
|
||||
// echo $CI->config->item('log_path');
|
||||
// log_message('error','Hi this');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@ -63,6 +63,7 @@ class GETPROCESSEDJSON
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -102,6 +103,44 @@ class GETPROCESSEDJSON
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(count($raw_json['servicing_details']) && $raw_json['servicing_details'][0] != null)
|
||||
{
|
||||
foreach($raw_json['servicing_details'][0]['service_providers'] as $service_provider_key => $service_providers)
|
||||
{
|
||||
foreach($service_providers as $key => $value)
|
||||
{
|
||||
if($value != "" || $value != null)
|
||||
{
|
||||
//compare with master_keys array
|
||||
foreach($master_keys as $master_key => $master_value)
|
||||
{
|
||||
if(!strcmp($key,$master_value['key']) && $master_value['ismaster'] == 1)
|
||||
{
|
||||
//GET MASASTER DATA
|
||||
|
||||
$table = constant($master_value['master_name']);
|
||||
|
||||
$temp_fields = array($master_tables_field_names[$master_value['master_name']].' as name');
|
||||
|
||||
$where_condition_array = array($master_tables_pkid[$master_value['master_name']] => $value);
|
||||
|
||||
$result_data = $CI->PD_Model->selectCustomRecords($temp_fields,$where_condition_array,$table);
|
||||
if(count($result_data))
|
||||
{
|
||||
//print_r($result_data[0]['name']);
|
||||
$key = $key . '_master';
|
||||
$raw_json['servicing_details'][0]['service_providers'][$service_provider_key][$key] = $result_data[0]['name'];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $raw_json;
|
||||
|
||||
@ -129,7 +129,8 @@ class INLINEPHOTOTRANSFORM
|
||||
|
||||
$temp_base64_string = $base64;
|
||||
$title = $doc_name;
|
||||
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
|
||||
$external_path = $CI->config->item('extrenal_data_path');
|
||||
$output_file = $external_path."/pd_reports/". $pd_details[0]['pd_id'] ."temp_base64_image.jpeg";
|
||||
|
||||
//Generate Random File Name
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
|
||||
@ -49,7 +49,20 @@ class MYLOG
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function logFunction2($dynamic = null) //$msg,$data,$log_type
|
||||
{
|
||||
$channel = 'external';
|
||||
$log_folder = $dynamic ? $dynamic : 'syslogs';
|
||||
include_once APPPATH.'/vendor/autoload.php';
|
||||
$logger = new \Monolog\Logger($channel);
|
||||
$streamHandler = new \Monolog\Handler\StreamHandler($log_folder.'/ssa_app_'.date('Y-m-d').'.html', $logger::DEBUG);
|
||||
$streamHandler->setFormatter(new \Monolog\Formatter\HtmlFormatter());
|
||||
$logger->pushHandler($streamHandler);
|
||||
|
||||
return $logger;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ class PUSH_NOTIFICATION
|
||||
curl_close( $ch );
|
||||
$CI =&get_instance();
|
||||
//print_r($result);
|
||||
MYLOG::logFunction()->info("PUSH NOTIFICATION ",array('firebase_result' => $result,'additional_data' => $additional_data,'token_type' => ($type == 1? 'WEB' : 'MOB')),'token' => $token);
|
||||
MYLOG::logFunction()->info("PUSH NOTIFICATION ",array('firebase_result' => $result,'additional_data' => $additional_data,'token_type' => ($type == 1? 'WEB' : 'MOB'),'token' => $token));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -366,7 +366,12 @@ abstract class REST_Controller extends CI_Controller {
|
||||
*/
|
||||
protected function early_checks()
|
||||
{
|
||||
$this->load->library('user_agent');
|
||||
//echo 'early_checks called';
|
||||
$this->load->helper('EXTERNAL_DIR_CHECK');
|
||||
EXTERNAL_DIR_CHECK::checkExternalDirectory();
|
||||
// die();
|
||||
|
||||
$this->load->library('user_agent');
|
||||
if ($this->agent->is_browser())
|
||||
{
|
||||
$agent = $this->agent->browser().' '.$this->agent->version();
|
||||
|
||||
@ -14,7 +14,7 @@ class PD_Model extends SPARQ_Model {
|
||||
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status)// $page represents mysql offset
|
||||
{
|
||||
//echo $status;die();
|
||||
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string');
|
||||
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note');
|
||||
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
|
||||
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id','LEFT');
|
||||
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');
|
||||
@ -759,7 +759,7 @@ class PD_Model extends SPARQ_Model {
|
||||
*/
|
||||
public function getPDMasterDetails($pdid,$random_string = null)
|
||||
{
|
||||
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %h:%i:%s %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created');
|
||||
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %h:%i:%s %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited,PDTRIGGER.is_zip_created,PDTRIGGER.pd_qc_note');
|
||||
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
|
||||
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
|
||||
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');
|
||||
|
||||
@ -1 +1 @@
|
||||
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 76.3;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 76.3;var url = 'http://localhost/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/development/pd_reports/900views/report_templates/chart.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
@ -2227,7 +2227,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
// business banking
|
||||
$bbRow = $pd_processed_forms[21][$business_count] ;
|
||||
$businessBankRow = json_decode($bbRow['processed_json'],true);
|
||||
//print_r($businessBankRow);
|
||||
//print_r($businessBankRow);die();
|
||||
$business_banking_common_remarks = $businessBankRow['banking_form_remark'];
|
||||
if(count($businessBankRow['banking_details'])>0){
|
||||
$getEachValues['is_od_cc'] = null;
|
||||
@ -2260,6 +2260,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bankingResult['bankDetails'] as $bdRow){
|
||||
|
||||
if($bdRow['account_name'] != '')
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $bdRow['account_name'] ?></td>
|
||||
@ -2272,7 +2275,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<td class="customtd"><?php echo $bdRow['main_business'] ?></td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
}?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }
|
||||
@ -2572,6 +2576,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$supplier_details = $pd_processed_forms[1][$business_count];
|
||||
$supplierRow = json_decode($supplier_details['processed_json'],true);
|
||||
//print_r($supplierRow);die();
|
||||
$supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : '');
|
||||
|
||||
$company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
|
||||
@ -2684,6 +2689,58 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($supplierRow['servicing_details'][0]['service_providers']) && count($supplierRow['servicing_details'][0]['service_providers']))
|
||||
{
|
||||
foreach($supplierRow['servicing_details'][0]['service_providers'] as $serviceRow){
|
||||
|
||||
if($serviceRow['service_provider_name'] != "" || $serviceRow['service_provider_name'] != null)
|
||||
{
|
||||
$total_no_of_suppliers++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$total_payments_percent_on_credit_for_supplier += $serviceRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'];
|
||||
|
||||
$temp['supplier_first_row'] = '<tr><td class="customtd">1</td><td class="customtd_leftalign">Item Purchased </td>'.'<td class="customtd">'.$serviceRow['service_provider_name'].'</td></tr>';
|
||||
|
||||
$supplier_second_row = '<tr><td class="customtd">2</td><td class="customtd_leftalign">Contact Person </td>';
|
||||
|
||||
$supplier_second_row .= isset($serviceRow['person_title_name_master']) ? '<td class="customtd">' . $serviceRow['person_title_name_master'].' ': '<td class="customtd">' . '';
|
||||
$supplier_second_row .= $serviceRow['service_provider_contact_person_name'] ;
|
||||
|
||||
$supplier_second_row .= isset($serviceRow['person_designation']) && $serviceRow['person_designation']== 1 ? ' '.$serviceRow['other_person_designation'] : ' ';//
|
||||
|
||||
$supplier_second_row .= isset($serviceRow['person_designation_master']) ? $serviceRow['person_designation_master'] : '' ;
|
||||
|
||||
$supplier_second_row .= ' '.$serviceRow['service_provider_supplier_name'].'</td>';
|
||||
$temp['supplier_second_row'] = $supplier_second_row.'</tr>';
|
||||
|
||||
$temp['supplier_third_row'] = '<tr><td class="customtd">3</td><td class="customtd_leftalign">Mobile Number </td>'.'<td class="customtd">'. (isset($serviceRow['service_provider_contact_person_mobile_number']) ? $serviceRow['service_provider_contact_person_mobile_number'].'</td></tr>' : 'Not Provided' .'</td></tr>');
|
||||
|
||||
$temp['supplier_fourth_row'] = '<tr><td class="customtd">4</td><td class="customtd_leftalign">Landline No</td>';
|
||||
|
||||
$temp['supplier_fourth_row'] .= $serviceRow['person_stdcode'] && $serviceRow['person_landline'] ? '<td class="customtd">'. $serviceRow['person_stdcode'].' '.$serviceRow['person_landline'].'</td></tr>' : '<td class="customtd">'.'Not Provided'.'</td></tr>';
|
||||
|
||||
$temp['supplier_fifth_row'] = '<tr><td class="customtd">5</td><td class="customtd_leftalign">Payment Terms</td>';
|
||||
|
||||
$temp['supplier_fifth_row'] .= isset($serviceRow['service_provider_payment_type_master']) ? '<td class="customtd">'. $serviceRow['trade_product_payment_type_master'] .'</td></tr>' : '<td class="customtd">NA</td></tr>';
|
||||
|
||||
$temp['supplier_sixth_row'] = '<tr><td class="customtd">6</td><td class="customtd_leftalign">Payment Mode</td>';
|
||||
|
||||
$temp['supplier_sixth_row'] .= $serviceRow['service_provider_payment_mode'] ? '<td class="customtd">'. $serviceRow['trade_product_payment_mode'] .'</td></tr>' : '<td class="customtd">NA</td></tr>';
|
||||
|
||||
$temp['supplier_seventh_row'] = '<tr><td class="customtd">7</td><td class="customtd_leftalign">No of Days Credit</td>';
|
||||
|
||||
$temp['supplier_seventh_row'] .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '<td class="customtd">'. $serviceRow['service_provider_credit_days_from'].' to '. $serviceRow['service_provider_credit_days_to'].' days</td></tr>' : '<td class="customtd">NA</td></tr>';
|
||||
array_push($supplierResult,$temp);
|
||||
|
||||
//}
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
// echo "dsfnsdkfnj**********";
|
||||
//print_r($supplierResult);die();
|
||||
echo '<h3 contenteditable="true">Supplier Details</h3>' ;
|
||||
@ -2944,7 +3001,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
for($img_row = 0; $img_row < $stock_img_row_count; $img_row++)
|
||||
{
|
||||
|
||||
if($img_row > 0) { break; }
|
||||
echo '<tr>';
|
||||
$from = $img_row == 0 ? $img_row : ($img_row+2);
|
||||
$to = ($from + 2);
|
||||
@ -3733,8 +3790,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</li>
|
||||
</ul>
|
||||
<?php }
|
||||
|
||||
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
|
||||
?>
|
||||
|
||||
|
||||
@ -3742,7 +3797,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
else{?>
|
||||
<p>Neighbour Check was not possible due to Could not verify</p>
|
||||
|
||||
<?php }?>
|
||||
<?php
|
||||
|
||||
if($neighbourhood_form_common_remarks != ""){ echo '<p>'. $neighbourhood_form_common_remarks.'</p>';}
|
||||
}?>
|
||||
|
||||
<!-- #################end neighbourhood/reference check #################-->
|
||||
|
||||
|
||||
@ -71,9 +71,6 @@
|
||||
{
|
||||
define('ENVIRONMENT','development');
|
||||
}
|
||||
//echo ENVIRONMENT;
|
||||
|
||||
//die();
|
||||
|
||||
|
||||
/*
|
||||
@ -94,7 +91,7 @@ switch (ENVIRONMENT)
|
||||
|
||||
case 'testing':
|
||||
error_reporting(-1);
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_errors', 0);
|
||||
break;
|
||||
case 'production':
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user