diff --git a/modules/articoli/edit.php b/modules/articoli/edit.php
index 29ba00fd3..02be6b177 100644
--- a/modules/articoli/edit.php
+++ b/modules/articoli/edit.php
@@ -79,12 +79,9 @@ $_SESSION['superselect']['id_categoria'] = $record['id_categoria'];
{[ "type": "select", "label": "", "name": "um", "value": "$um$", "ajax-source": "misure", "icon-after": "add|" ]}
-
{[ "type": "checkbox", "label": "", "name": "abilita_serial", "value": "$abilita_serial$", "help": "", "placeholder": "", "extra": " 0) ? 'readonly' : ''; ?>" ]}
-
-
diff --git a/modules/emails/src/EmailHook.php b/modules/emails/src/EmailHook.php
index fe379f4fc..ee698cff1 100644
--- a/modules/emails/src/EmailHook.php
+++ b/modules/emails/src/EmailHook.php
@@ -24,6 +24,7 @@ class EmailHook extends Manager
$accounts = Account::all();
$remaining = Mail::whereNull('sent_at')
->where($failed)
+ ->where('attempt', '<', 10)
->whereIn('id_account', $accounts->pluck('id'))
->count();
@@ -55,6 +56,7 @@ class EmailHook extends Manager
$mail = Mail::whereNull('sent_at')
->where('id_account', $account->id)
->where($failed)
+ ->where('attempt', '<', 10)
->orderBy('created_at')
->first();
@@ -83,12 +85,14 @@ class EmailHook extends Manager
$user = auth()->getUser();
$current = Mail::whereDate('sent_at', '>', $yesterday)
+ ->where('attempt', '<', 10)
->where('created_by', $user->id)
->count();
$total = Mail::where(function ($query) use ($yesterday) {
$query->whereDate('sent_at', '>', $yesterday)
->orWhereNull('sent_at');
})
+ ->where('attempt', '<', 10)
->where('created_by', $user->id)
->count();
diff --git a/modules/scadenzario/edit.php b/modules/scadenzario/edit.php
index 54f4c7e26..999825e60 100644
--- a/modules/scadenzario/edit.php
+++ b/modules/scadenzario/edit.php
@@ -160,7 +160,7 @@ echo '
diff --git a/modules/stato_email/actions.php b/modules/stato_email/actions.php
new file mode 100644
index 000000000..652a283f0
--- /dev/null
+++ b/modules/stato_email/actions.php
@@ -0,0 +1,20 @@
+attempt = 0;
+
+ $mail->save();
+ break;
+
+ case 'delete':
+ if (empty($mail->sent_at)) {
+ $mail->delete();
+
+ flash()->info(tr('Email rimossa dalla coda di invio!'));
+ }
+
+ break;
+}
diff --git a/modules/stato_email/edit.php b/modules/stato_email/edit.php
index f1d60b80a..bd0585336 100644
--- a/modules/stato_email/edit.php
+++ b/modules/stato_email/edit.php
@@ -29,7 +29,9 @@ echo '
'.tr('Ultimo tentativo').'
- '.($mail->failed_at ? timestampFormat($mail->failed_at) : '-').'
+ '.($mail->processing_at ? timestampFormat($mail->processing_at) : '-').' ('.tr('totale: _TOT_', [
+ '_TOT_' => $mail->attempt,
+ ]).')
@@ -139,3 +141,17 @@ echo '