1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-28 06:29:27 +01:00

Fix visualizzazione data invio newsletter

This commit is contained in:
Pek5892 2023-07-25 15:59:06 +02:00
parent 2007e33b57
commit 4703738541

View File

@ -95,18 +95,17 @@ foreach ($destinatari_filtrati as $destinatario) {
// Informazioni di invio // Informazioni di invio
if (empty($lista)) { if (empty($lista)) {
$mail_id = $origine->pivot->id_email; $mail = $dbo->fetchOne('SELECT * FROM em_emails WHERE id_newsletter='.prepare($id_newsletter).' AND id_record='.prepare($origine->idanagrafica));
$mail = Mail::find($mail_id); if (!empty($mail['sent_at'])) {
if (!empty($mail) && !empty($mail->sent_at)) {
$info_invio = ' $info_invio = '
<span class="text-success"> <span class="text-success">
<i class="fa fa-paper-plane"></i> '.timestampFormat($mail->sent_at).' <i class="fa fa-paper-plane"></i> '.timestampFormat($mail['sent_at']).'
</span>'; </span>';
} else { } else {
$info_invio = ' $info_invio = '
<span class="text-info"> <span class="text-info">
<i class="fa fa-clock-o"></i> '.tr('Non ancora inviata').' <i class="fa fa-clock-o"></i> '.tr('Non ancora inviata').'
</span>'; </span>';
} }
$riga[] = '<div class="text-center">'.$info_invio.'</div>'; $riga[] = '<div class="text-center">'.$info_invio.'</div>';