Live fixes : ps
This commit is contained in:
parent
e5b342f946
commit
1fc61bff1a
@ -523,12 +523,14 @@ class PDALERTS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sendSalesPDMail($CI,$salespd_id,$state)
|
public static function sendSalesPDMail($CI,$salespd_id,$city)
|
||||||
{
|
{
|
||||||
|
|
||||||
log_message('ERROR','####SALESPD MAIL CALLED'.$salespd_id);
|
log_message('ERROR','####SALESPD MAIL CALLED'.$salespd_id);
|
||||||
$mail = $CI->phpmailer_library->load();
|
$mail = $CI->phpmailer_library->load();
|
||||||
$mail_contents = SELF::salesPDMailContentGrabber($CI,$salespd_id);
|
$mail_contents = SELF::salesPDMailContentGrabber($CI,$salespd_id);
|
||||||
|
$city_arg = array(869,1239,5785,1248,4307,4085,6081);
|
||||||
|
// $city_arg = array('new delhi','Noida','Ghaziabad','Gurgaon','Ludhiana','Jaipur','Faridabad');
|
||||||
if(count($mail_contents))
|
if(count($mail_contents))
|
||||||
{
|
{
|
||||||
$mail->IsSMTP(); // Telling the class to use SMTP
|
$mail->IsSMTP(); // Telling the class to use SMTP
|
||||||
@ -540,14 +542,14 @@ class PDALERTS
|
|||||||
$mail->Password = "noreply@ssa"; // "The password"
|
$mail->Password = "noreply@ssa"; // "The password"
|
||||||
$mail->Port = 465; // "The port"
|
$mail->Port = 465; // "The port"
|
||||||
$mail_id = 'ssa@venbainfotech.com';
|
$mail_id = 'ssa@venbainfotech.com';
|
||||||
if(ENVIRONMENT == 'testing' && $state == 5){ $mail->addBCC("venkiraj0@gmail.com");}
|
if(ENVIRONMENT == 'testing' && in_array($city,$city_arg)){ $mail->addBCC("venkiraj0@gmail.com");}
|
||||||
if(ENVIRONMENT == 'production')
|
if(ENVIRONMENT == 'production')
|
||||||
{
|
{
|
||||||
$mail_id = 'cpa@smcfinance.com';
|
$mail_id = 'cpa@smcfinance.com';
|
||||||
$mail->addBCC("neville@sinemanagement.com");
|
$mail->addBCC("neville@sinemanagement.com");
|
||||||
$mail->addBCC("ssa@venbainfotech.com");
|
$mail->addBCC("ssa@venbainfotech.com");
|
||||||
$mail->addAddress('cpumumbai@smcfinance.com');
|
$mail->addAddress('cpumumbai@smcfinance.com');
|
||||||
if($state == 5){ $mail->addBCC("satendersingh@smcfinance.com");}
|
if(in_array($city,$city_arg)){ $mail->addBCC("satendersingh@smcfinance.com");}
|
||||||
//$mail->addBCC("vitvelz@gmail.com");
|
//$mail->addBCC("vitvelz@gmail.com");
|
||||||
} // Name is optional }
|
} // Name is optional }
|
||||||
$mail->addAddress($mail_id);
|
$mail->addAddress($mail_id);
|
||||||
|
|||||||
@ -130,6 +130,7 @@ class SMC_Credit_PD_Model extends SPARQ_Model {
|
|||||||
$this->db->from(USERPROFILE.' as USERPROFILE');
|
$this->db->from(USERPROFILE.' as USERPROFILE');
|
||||||
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES',"USERPROFILE.userid = USERPROFILEROLES.fk_userid and USERPROFILEROLES.user_role = $role and USERPROFILEROLES.isactive = 1",'INNER');
|
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES',"USERPROFILE.userid = USERPROFILEROLES.fk_userid and USERPROFILEROLES.user_role = $role and USERPROFILEROLES.isactive = 1",'INNER');
|
||||||
$this->db->where_in('USERPROFILE.fk_state',$temp2);
|
$this->db->where_in('USERPROFILE.fk_state',$temp2);
|
||||||
|
$this->db->where('USERPROFILE.isactive',1);
|
||||||
$CMusers = $this->db->get()->result_array();
|
$CMusers = $this->db->get()->result_array();
|
||||||
|
|
||||||
$result = $CMusers;
|
$result = $CMusers;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user