SMC report lpic ink Changes : ps

This commit is contained in:
VE10-Sanjeev 2022-08-18 21:30:15 +05:30
parent 56b76d8672
commit 5a308b7544
5 changed files with 53 additions and 6 deletions

View File

@ -1522,6 +1522,7 @@ public function filterSalesPDList_post() {
$this->load->helper('smc_creditpd');
$this->load->helper('cet_creditpd');
$this->load->helper('smcpdscore');
$this->load->helper('report_attachments');
$view_data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($records['pd_id']);
@ -1684,14 +1685,14 @@ public function filterSalesPDList_post() {
}
cet_creditpd::pushwithcetcreditpdapi($common_fields,$CETAPP_creditPD_data);
$view_data['report_attachments'] = (new report_attachments)->getSMCReportAttchments($records['pd_id'],$view_data['pd_master_details'][0]['random_string'],$view_data['pd_master_details']);
if($view_data['pd_master_details'][0]['product_abbr'] == "NBFC/MFI"){
$html_content = $this->load->view('smc_creditpd_reports/NBFC',$view_data,true);
}else{
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
}
// print_r($html_content);exit();
print_r($html_content);exit();
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
$new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant'];

View File

@ -43,6 +43,23 @@ class report_attachments
return $attachment;
}
public function getSMCReportAttchments($pdid,$random_string,$pd_master_details = array())
{
$CI =&get_instance();
$CI->load->helper('url_shortener');
$uri = url_shortener::SMC_report_url_shorten($pdid,$random_string);
$attachment = '<div id="page_break">
</div><h2>Data Links</h2>
<p><a target="_blank" href="'.PDF_ATTACHEMENT_URL.$uri['ppdf'].'">Click here for Image PDF Link</a></p> <p> <a target="_blank" href="'.PDF_ATTACHEMENT_URL.$uri['zip'].'">Click here for Image ZIP Link</a> </p>';
$attachment.= '<br><br><br><p style="font-size:10px;text-align:center;">(Note all links will expire in 15 days from the date of report generation.)</p>';
return $attachment;
}
}

View File

@ -44,6 +44,31 @@ class url_shortener
}
public static function SMC_report_url_shorten($pdid,$random_string,$type = '')
{
//echo 'this is from daiu';
$CI =&get_instance();
$CI->load->model('PD_Model');
$date_of_creation = date('Ymd');
$uri = array();
if($type)
{
$uri[ $type ] = $type.'/'.$date_of_creation.'/'.$pdid.'/'.$random_string;
}
else
{
$uri[ 'ppdf' ] = custom_encryption::encode ( 'ppdf/'.$date_of_creation.'/'.$pdid.'/'.$random_string);
$uri[ 'zip' ] = custom_encryption::encode ( 'zip/'.$date_of_creation.'/'.$pdid.'/'.$random_string );
}
// print_r($uri);die();
return $uri;
}
}

View File

@ -1552,8 +1552,10 @@ if(count($smc_images))
</tbody>
</table>
<?php if($report_attachments){
echo $report_attachments;
}
?>
</body>
</html>

View File

@ -594,8 +594,10 @@ if(count($smc_images))
</tbody>
</table>
<?php if($report_attachments){
echo $report_attachments;
}
?>
</body>
</html>