ADDED_CC_FOR_EVERY_INVOICE

This commit is contained in:
Srinivas-Saravanan 2025-03-04 14:31:12 +05:30
parent 0f6ca6b247
commit 8994bd58b9
3 changed files with 10 additions and 1 deletions

View File

@ -939,6 +939,7 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_
$params->instance_id = $_ENV['WAAI_INSTANCE'];
$params->access_token = $_ENV['WAAI_TOKEN'];
}
$records['cc'] = getenv('BuisnessCCMail');
if(isset($contact_method['msg_mail'])){
log_message('info',"Approve notification Email Request data = " . json_encode($records));

View File

@ -28,6 +28,14 @@ class NotificationHelper
throw new \Exception("Email and Subject are Must Please Try again..");
}
$this->email->setTo($records['recipient_email']);
if (!empty($records['cc'])) {
if (is_array($records['cc'])) {
$this->email->setCC($records['cc']); // Directly use array
} else {
$this->email->setCC(explode(',', $records['cc'])); // Convert string to array
}
}
$this->logger->error('Helper : Email recipient = '.$records['recipient_email']);
$this->email->setFrom('web@vijayabharathambooks.com', isset($records['company'])?$records['company']:"VB");
$this->email->setSubject($records['subject']);

View File

@ -47,7 +47,7 @@ class PaymentStatusModel extends Model
$builder->where('payment_status.is_active',1);
$data = $builder->get()->getResultArray();
log_message('error',json_encode($this->db->getLastQuery()->getQuery()));
// log_message('error',json_encode($this->db->getLastQuery()->getQuery()));
return $data; // Fetch and return as an array
}
}