From bb6433767ec7f94f74a8fde773e4fa9c7111e7ee Mon Sep 17 00:00:00 2001 From: sanjeev Date: Tue, 28 Dec 2021 17:13:13 +0530 Subject: [PATCH] Reverted Code : ps --- api/application/controllers/PD_Controller.php | 4 ++-- api/application/helpers/pdalerts_helper.php | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 7a6533e2..1214498c 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -662,7 +662,7 @@ class PD_Controller extends REST_Controller { { $pd_applicant_detail['fk_pd_id'] = $pd_id; $pd_applicant_detail['applicant_name'] = trim(MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['applicant_name'])); - $pd_applicant_detail['company_name'] = trim(strtoupper($pd_applicant_detail['company_name'])); + $pd_applicant_detail['company_name'] = trim(MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['company_name'])); $co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS); if($co_applicant_id != null || $co_applicant_id != '') @@ -1468,7 +1468,7 @@ public function assignPDTempalate($data) foreach($pd_applicant_details as $pd_applicant_detail) { $pd_applicant_detail['applicant_name'] = trim($pd_applicant_detail['applicant_name']); - $pd_applicant_detail['company_name'] = trim(strtoupper($pd_applicant_detail['company_name'])); + $pd_applicant_detail['company_name'] = trim(MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['company_name'])); if($pd_applicant_detail['pd_co_applicant_id'] != null || $pd_applicant_detail['pd_co_applicant_id'] != "") { //$pd_id = $pd_applicant_detail['fk_pd_id']; diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php index a6c6e175..9298600d 100644 --- a/api/application/helpers/pdalerts_helper.php +++ b/api/application/helpers/pdalerts_helper.php @@ -694,6 +694,7 @@ class PDALERTS public static function sendMWcreditPDMail($CI,$pd_id,$flag) { // $pd_id = $arr['pd_id']; + log_message('ERROR','#### MW AGENCY-MAIL CALLED'.$pd_id); if($pd_id != "" || $pd_id != null) { // $CI->db->SELECT("PDTRIGGER.pd_id,PDTRIGGER.pd_sno,ENTITY.short_name,PRODUCT.abbr,'concat(USERPROFILE.first_name,' ',USERPROFILE.last_name)' as officer_name,AGENCYLIST.agency_name,USERPROFILE.vendor_status,AGENCYLIST.mail_id,USERPROFILE.email"); @@ -724,20 +725,24 @@ class PDALERTS $msg = "" ; $subject = "" ; if($flag == 2){ // Mail - RCM + log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 2 RCM '.$pd_id); $mail_id = $core_details[0]['allocated_email']; $msg = "PD for Loan Application ID-".$core_details[0]['pd_sno']." (".$core_details[0]['applicant_name'].") have been triggered to the vendor.


This is an automatically generated notification mail. Please contact on vendor email id for any queries/update. "; $subject = "PD allocated to vendor for application ID - ".$core_details[0]['pd_sno'] ." & ".$core_details[0]['applicant_name']; // $mail->addBCC("ps9064515@gmail.com"); + // $mail_id = 'ps9064515@gmail.com'; }else if($flag == 1){ // mail - Agency // $mail_id = "venbalap08@gmail.com"; + log_message('ERROR','#### MW AGENCY-MAIL CALLED TYPE 1 AGENCY '.$pd_id); $mail_id = $core_details[0]['agency_mail']; $msg = "PD for Loan Application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']." have been allocated to you.


This is an automatically generated notification mail. Please contact on client email id for any queries/update. "; $subject = "PD allocated for application ID - ".$core_details[0]['pd_sno'] ." & ". $core_details[0]['applicant_name']; // $mail->addBCC("venbalap08@gmail.com"); }else if($flag == 3){ + log_message('ERROR','#### MW-AGENCY MAIL CALLED TYPE 3 TRIGGER '.$pd_id); $mail_id = $core_details[0]['allocated_email']; $CI->db->SELECT("*"); $CI->db->FROM(PDNOTIFICATIONMSG." as PDNOTIFICATIONMSG"); @@ -773,18 +778,20 @@ class PDALERTS $mail->Subject = $subject; $mail->Body = 'Dear Team ,

'.$msg; $mail->AltBody = $msg; + // print_r($mail);die(); if(!$mail->send()) { // $logger->error("Mailer Error:" ,array($mail->ErrorInfo)); - log_message('ERROR','### MWISE-CREDITPD(AGENCY) MAIL NOT SEND'.$subject.'- mail Error - '.$mail->ErrorInfo); + log_message('ERROR','#### MW AGENCY-MAIL NOT SEND '.$pd_id.' - ERR - '.$mail->ErrorInfo); } else{ - // log_message('INFO','### MWISE-CREDITPD(AGENCY) MAIL SENDED SUCESSFULLY'.$subject); + log_message('ERROR','#### MW AGENCY-MAIL SENDED SUCESSFULLY'.$subject); } + $mail->SmtpClose(); }else{ - log_message('INFO','### MWISE-CREDITPD(AGENCY) MAIL NOT SEND BCOZ '.count($core_details).' core_details'); + // log_message('INFO','### MWISE-CREDITPD(AGENCY) MAIL NOT SEND BCOZ '.count($core_details).' core_details'); } }else{ - log_message('INFO','### MWISE-CREDITPD(AGENCY) MAIL NOT SEND BCOZ THERE IS NO PDID'); + // log_message('INFO','### MWISE-CREDITPD(AGENCY) MAIL NOT SEND BCOZ THERE IS NO PDID'); } }//function closed here.