Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2025-04-01 16:48:45 +05:30
commit 2720ddcc78
3 changed files with 36 additions and 25 deletions

View File

@ -928,7 +928,7 @@ function viewIGRDetails()
$result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId'),$roleId);
$result_for_history = $this->inwardgateregister_model->getHistoryDetailsforEmail($IGRNo);
$notification = new Notification();
$history_content = "<br>IGR History<br><br> <ul>";
@ -984,19 +984,21 @@ function viewIGRDetails()
// $history_content .= "<br>" . $readable_field . ": `" . $history[$j]->old_data . "` was updated to `" . $history[$j]->new_data . "` .";
}
$history_content .= "</ul>";
$email = "";
for ($i = 0; $i < count($result_for_email['emails']); $i++) {
$email .= $result_for_email['emails'][$i]->email . " , ";
$to_email_addr = "";
for ($i = 0; $i < count($result_for_email['to_mails']); $i++) {
$to_email_addr .= $result_for_email['to_mails'][$i]->email . " , ";
// $to_email_addr .= "sanjeev.p@venbainfotech.com,gowtham.m@venbainfotech.com";
}
$email = rtrim($email, " ,");
$to_email_addr = rtrim($to_email_addr, " ,");
$email_response = $notification->sendEmail([
'recipient_email' => $email,
'recipient_email' => $to_email_addr,
'subject' => $result_for_email['company'].' - IGR Notification',
// 'carboncopy'=>Sales@resicoindustries.com,Factory@resicoindustries.com,Invoice@resicoindustries.com,
// 'description' => 'IGR Number : '.$IGRNo.' is Edited By '.($result_for_email['full_name'] ?? $this->session->get('name'))." On ".date('d-m-Y H:i A', strtotime(get_current_date_time() . ' +30 seconds')). $history_content,
'description' => $result_for_history['first_line']."<br>" .$history_content,
'company' => $result_for_email['company'],
'from_mail'=> $result_for_email['from_mail']
'from_mail'=> $result_for_email['from_mails']
]);
log_message('error', 'email reponse : ' . json_encode($email_response));
@ -1006,9 +1008,9 @@ function viewIGRDetails()
// Log the result
if ($receiving_status) {
$this->logger->info("Email IDs = " . $email . " " . $mail_log);
$this->logger->info("Email IDs = " . $to_email_addr . " " . $mail_log);
} else {
$this->logger->error("Email IDs = " . $email . " " . $mail_log);
$this->logger->error("Email IDs = " . $to_email_addr . " " . $mail_log);
}
// echo "***".$history_content;die;
@ -1424,22 +1426,24 @@ function updateIGRWeight(){
$result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId'),$roleId);
$email = "";
for ($i = 0; $i < count($result_for_email['emails']); $i++) {
$email .= $result_for_email['emails'][$i]->email . " , ";
}
$email = rtrim($email, " ,");
// print_r($result_for_email);die;
$to_email_addr = '';
for ($i = 0; $i < count($result_for_email['to_mails']); $i++) {
$to_email_addr .= $result_for_email['to_mails'][$i]->email . " , ";
}
// $to_email_addr = " gowtham.m@venbainfotech.com , sanjeev.p@venbainfotech.com";
$to_email_addr = rtrim($to_email_addr, " ,");
$content = 'A new remark was created by '.$result_for_email['full_name'].' against IGR no '.$IGRNo.',</br></br> "'.$remark.'"';
$notification = new Notification();
$notification->sendEmail([
'recipient_email' => $email,
'recipient_email' => $to_email_addr,
'subject' => $result_for_email['company'].' - IGR Remark Raised',
'description' => $content,
'company' => $result_for_email['company'],
'from_mail'=> $result_for_email['from_mail']
'from_mail'=> $result_for_email['from_mails']
]);

View File

@ -1317,15 +1317,22 @@ $builder = $this->db->table('t_igr_history')
$query2 = $this->db->query("
SELECT email FROM tbl_users
WHERE isDeleted = 0 AND roleId =".$roleId // hardcoded because auditor role only. refer with gwm 29/01/2025
WHERE isDeleted = 0 AND roleId =".$roleId
);
$emails = $query2->getResult();
$to_mails = $query2->getResult();
$query3 = $this->db->query("
SELECT email FROM tbl_users
WHERE isDeleted = 0 AND userId =".$userId
);
$from_mails = $query3->getRow();
return [
'from_mail' => $company ? $company->EmailAddress : null,
'full_name' => $fullName ? $fullName->FullName : null,
'company' => $company ? $company->CompanyName : null,
'emails' => $emails
'company_mail' => $company ? $company->EmailAddress : null,
'full_name' => $fullName ? $fullName->FullName : null,
'from_mails' => $from_mails ? $from_mails->email : null ,
'to_mails' => $to_mails,
];
}

View File

@ -2417,7 +2417,7 @@ if (!empty($getlogpodtl)) {
</td>
<td align="right"><?php echo $record->Quantity ?></td>
<td align="left"><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td>
<td align="right"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
<td align="right">
<?php echo number_format($record->BasicValue, 2, '.', ''); ?>
@ -4555,11 +4555,11 @@ if (!empty($getlogpodtl)) {
<td align="right">${basicval}</td>
<td align="right">${TotalTaxValue}</td>
<td align="right">${TotalOrderValue}</td>
<td>
<td align="center">
<a data-target='#EDITREVENUE' data-id="${temp}" data-userid="${temp}" data-toggle="modal" href="#EDITREVENUE">
<i class="ri-pencil-fill"></i>
</a>
&nbsp;&nbsp;&nbsp;
<a href='#' onclick="DeleteRow('${temp}')" class="link" data-id="${temp}" data-userid="${temp}" id="Del">
<span class="ri-delete-bin-7-fill"></span>
</a>