1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-14 00:24:28 +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
if (empty($lista)) {
$mail_id = $origine->pivot->id_email;
$mail = Mail::find($mail_id);
if (!empty($mail) && !empty($mail->sent_at)) {
$mail = $dbo->fetchOne('SELECT * FROM em_emails WHERE id_newsletter='.prepare($id_newsletter).' AND id_record='.prepare($origine->idanagrafica));
if (!empty($mail['sent_at'])) {
$info_invio = '
<span class="text-success">
<i class="fa fa-paper-plane"></i> '.timestampFormat($mail->sent_at).'
</span>';
<span class="text-success">
<i class="fa fa-paper-plane"></i> '.timestampFormat($mail['sent_at']).'
</span>';
} else {
$info_invio = '
<span class="text-info">
<i class="fa fa-clock-o"></i> '.tr('Non ancora inviata').'
</span>';
<span class="text-info">
<i class="fa fa-clock-o"></i> '.tr('Non ancora inviata').'
</span>';
}
$riga[] = '<div class="text-center">'.$info_invio.'</div>';