company name in mail : ps

This commit is contained in:
VE10-Sanjeev 2022-05-18 22:02:55 +05:30
parent 20a2cf0dfb
commit 9fd82c836d

View File

@ -756,19 +756,19 @@ class PDALERTS
$mail_id = $rcm_mail_id;
}
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2(RCM and CM) PD ID :'.$pd_id." and MAIL : ".$mail_id);
$msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." ".$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]['applicant_name'];
$msg = "PD for Loan Application ID-".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']."(".$core_details[0]['pd_sno'].")"." have been triggered to the vendor. ";
$subject = "PD allocated to vendor for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']."(".$core_details[0]['pd_sno'].")";
$ref_str = "vendor email id";
}
if($flag == 1){ // Mail Content For - Agency ONLY
$mail_id = $core_details[0]['agency_mail'];
log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1(AGENCY) PD ID :'.$pd_id." and MAIL : ".$mail_id);
$msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name']." have been allocated to you. ";
$subject = "PD allocated for application ID - ".$core_details[0]['pd_sno']." ".$core_details[0]['applicant_name'];
$msg = "PD for Loan Application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']."(".$core_details[0]['pd_sno'].") have been allocated to you. ";
$subject = "PD allocated for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']."(".$core_details[0]['pd_sno'].")";
$ref_str = "client email id";
}
if($flag == 3){ // Mail Conent For - Allocated Person ONLY
$mail_id = $core_details[0]['allocated_email'];
// $mail_id = $core_details[0]['allocated_email'];
log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3(Normal Allocated Person) PD ID : '.$pd_id." and MAIL : ".$mail_id);
$CI->db->SELECT("*");
$CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG");
@ -777,12 +777,12 @@ class PDALERTS
$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]['applicant_name'];
$subject = "PD allocated for application ID - ".$core_details[0]['lender_applicant_id']." ".$core_details[0]['applicant_name']."(".$core_details[0]['pd_sno'].")";
$ref_str = "";
// $mail->addBCC("sanjeev.p@venbainfotech.com");
}
if(!empty($core_details[0]['excel_file_id']) && $core_details[0]['excel_file_id'] != null){
// if(!empty($core_details[0]['excel_file_id']) && $core_details[0]['excel_file_id'] != null){
$CI->db->SELECT("PDAPPLICANTSDETAILS.applicant_name,PDAPPLICANTSDETAILS.mobile_no");
$CI->db->FROM(PDAPPLICANTSDETAILS." as PDAPPLICANTSDETAILS");
$CI->db->WHERE("PDAPPLICANTSDETAILS.fk_pd_id",$pd_id);
@ -799,10 +799,10 @@ class PDALERTS
$company_name = "-";
$applicant_name = "-";
}
}else{
$company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
$applicant_name = $core_details[0]['applicant_name'] ? $core_details[0]['applicant_name'] : "-";
}
// }else{
// $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
// $applicant_name = $core_details[0]['applicant_name'] ? $core_details[0]['applicant_name'] : "-";
// }
// $company_name = $core_details[0]['company_name'] ? $core_details[0]['company_name'] : "-";
$msg .= "<br><br> 1. Name of the firm : ".$company_name
."<br> 2. Address : ".$core_details[0]['addressline1'].",".$core_details[0]['city_name'].",".$core_details[0]['state_name']."-".$core_details[0]['pincode']."."
@ -813,6 +813,7 @@ class PDALERTS
if(!empty($ref_str)){
$msg .= "<br><br><br> This is an automatically generated notification mail. Please contact on ".$ref_str." for any
queries/update. ";
// print_r($msg);die();
if(!empty($mail_id)){
$arg = array('mail'=>$mail_id,'pd_id'=>$pd_id,'msg'=>$msg,'subject'=>$subject);
SELF::send_smcagencymail($CI,$arg);