Credit_PD_report for cet : ps
This commit is contained in:
parent
985935f9ef
commit
20a2cf0dfb
@ -1889,28 +1889,34 @@ public function filterSalesPDList_post() {
|
||||
$get = $this->get('credit_pd_id');
|
||||
if(!empty($get)){
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($get);
|
||||
|
||||
$old_pdf_name = $pd_master_details[0]['main_applicant'];
|
||||
$old_key = 'pd'.$records['pd_id'].'/pd_reports/'.$old_pdf_name.'.pdf';
|
||||
|
||||
$new_pdf_name = "PD_Report_".$pd_master_details[0]['main_applicant'];
|
||||
$new_key = 'pd'.$records['pd_id'].'/pd_reports/'.$new_pdf_name.'.pdf';
|
||||
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.(ENVIRONMENT == 'production' ? 7 : 35);
|
||||
|
||||
$output_file = $this->external_path ."/pd_reports/" . $get . "/temp.pdf";
|
||||
|
||||
$_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$old_key,'30 minutes');
|
||||
|
||||
$headers = @get_headers($_uri);
|
||||
if($headers && strpos( $headers[0], '200')) {
|
||||
$singed_uri = $_uri;
|
||||
}else {
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$new_key,'30 minutes');
|
||||
if($pd_master_details[0]['pd_status'] == "COMPLETED"){
|
||||
$old_pdf_name = $pd_master_details[0]['main_applicant'];
|
||||
$old_key = 'pd'.$get.'/pd_reports/'.$old_pdf_name.'.pdf';
|
||||
|
||||
$new_pdf_name = "PD_Report_".$pd_master_details[0]['main_applicant'];
|
||||
$new_key = 'pd'.$get.'/pd_reports/'.$new_pdf_name.'.pdf';
|
||||
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.(ENVIRONMENT == 'production' ? 7 : 35);
|
||||
|
||||
$output_file = $this->external_path ."/pd_reports/" . $get . "/temp.pdf";
|
||||
|
||||
$_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$old_key,'30 minutes');
|
||||
|
||||
$headers = @get_headers($_uri);
|
||||
if($headers && strpos( $headers[0], '200')) {
|
||||
$singed_uri = $_uri;
|
||||
}else {
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$new_key,'30 minutes');
|
||||
}
|
||||
$data['records'] = $singed_uri;
|
||||
log_message('ERROR',"Credit Report Generated for CET App");
|
||||
$statusMsg = 'Report Available.';
|
||||
}else{
|
||||
log_message('ERROR',"Credit Report Is Not Completed Given PDID");
|
||||
$statusMsg = 'Report is Not Completed For Given PDID.';
|
||||
}
|
||||
$data['records'] = $singed_uri;
|
||||
log_message('ERROR',"Credit Report Generated for CET App");
|
||||
$statusMsg = 'Report Available.';
|
||||
|
||||
|
||||
}else{
|
||||
log_message('ERROR','Credit Report Not Available for CET App');
|
||||
$statusMsg = 'Report Not Available.';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user