mail fixes : ps

This commit is contained in:
VE10-Sanjeev 2025-02-03 08:47:26 +00:00
parent 25a3e3d3a0
commit 582292ea51

View File

@ -962,14 +962,14 @@ function viewIGRDetails()
"DriverName" => "Driver Name",
"DriverMobileNumber" => "Driver Mobile Number"
];
$history_content = "<br>The following values have been edited:<br>";
$history_content = "<br>The following values have been edited:";
for ($j = 0; $j < count($history); $j++) {
$field_name = $history[$j]->field;
$readable_field = isset($field_labels[$field_name]) ? $field_labels[$field_name] : $field_name;
$history_content .= "<br>" . $readable_field . ": " . $history[$j]->old_data . " was updated to " . $history[$j]->new_data . ".";
$history_content .= "<br>" . $readable_field . ": `" . $history[$j]->old_data . "` was updated into `" . $history[$j]->new_data . "` .";
}
for ($i = 0; $i < count($result_for_email['emails']); $i++) {
@ -981,7 +981,7 @@ function viewIGRDetails()
'company' => $result_for_email['company'],
'from_mail'=> $result_for_email['from_mail']
]);
log_message('error', 'email reponse : ' . json_encode($email_response));
// Determine the email response
$mail_log = isset($email_response['success']) ? 'Email sent successfully' : 'Failed to send email';
@ -1538,8 +1538,8 @@ function updateIGRWeight(){
$new_data = $hist['value'];
$old_data = NULL;
$same = false;
$same = false; // Flag to check if the same data exists
log_message('error', "$igr_no Save History function entered.");