SMC Vandor mail Format 2: ps

This commit is contained in:
sanjeev 2021-12-25 16:09:47 +05:30
parent 68b6e594f4
commit 28a274aeee
2 changed files with 19 additions and 7 deletions

View File

@ -1654,6 +1654,7 @@ public function assignPDTempalate($data)
$records['vendor_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ; //Here vendor_status is dynamic (ALLOCATED,SCHEDULED,COMPLETED like that)
//Mail - SMC Vendor.
if($records['vendor_status'] == ALLOCATED){
PDALERTS::sendMWcreditPDMail($this,$records['pd_id'],1);sleep(2);
PDALERTS::sendMWcreditPDMail($this,$records['pd_id'],2);
$records['pd_status'] = ALLOCATED_TO_FIA;
}
@ -11294,7 +11295,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
$pd_details['pd_status'] = ALLOCATED_TO_FIA;
$pd_details['vendor_status'] = ALLOCATED;
PDALERTS::sendMWcreditPDMail($this,$pd_details['pd_id'],1);
PDALERTS::sendMWcreditPDMail($this,$pd_details['pd_id'],3);
}
else if(count($regional_credit_manager))
{

View File

@ -721,16 +721,26 @@ class PDALERTS
if(count($core_details))
{
$mail = $CI->phpmailer_library->load();
if($flag == 2){
if($flag == 1){
// Allocated to Agency
$mail_id = $core_details[0]['agency_mail'];
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['lender_applicant_id'] ." ".$core_details[0]['short_name'].") have been triggered to the vendor. ";
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['short_name'];
}else if($flag == 1){
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['lender_applicant_id'] ." ".$core_details[0]['applicant_name'].") have been triggered to the vendor. ";
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['applicant_name'];
}else if($flag == 2){
// Allocated by CM/RCM
$mail_id = $core_details[0]['allocated_email'];
$msg = "PD for Loan Application ID -".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['short_name']." have been triggered to the vendor.";
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['short_name'];
$msg = "PD for Loan Application ID -".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['applicant_name']." have been triggered to the vendor.";
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['applicant_name'];
}else if($flag == 3){
$mail_id = $core_details[0]['allocated_email'];
$CI->db->SELECT("*");
$CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG");
$CI->db->WHERE("PDNOTIFICATIONMSG.pd_status",ALLOCATED);
$CI->db->WHERE("PDNOTIFICATIONMSG.isactive",1);
$pd_notification_msg = $CI->db->GET()->result_array();
$msg = $pd_notification_msg[0]['lender'];
$msg = self::stringReplace($msg,$core_details,'MAIL');
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['lender_applicant_id'] ." ".$core_details[0]['applicant_name'];
}
$mail->IsSMTP(); // Telling the class to use SMTP
@ -747,6 +757,7 @@ class PDALERTS
if(ENVIRONMENT == 'testing' || ENVIRONMENT == 'development') {
$fromName .= ' ( TEST ENV ) ';
$subject .= ' ( TEST ENV ) ';
// $mail->addBCC("venbalap08@gmail.com");
}
$mail->FromName = $fromName;
$mail->isHTML(true);