Fix message if no record found

This commit is contained in:
Laurent Destailleur 2023-02-27 04:24:12 +01:00
parent d4ab580e9b
commit 06422a5d03
2 changed files with 13 additions and 3 deletions

View File

@ -714,9 +714,13 @@ if ($object->fetch($id) >= 0) {
$i++;
}
} else {
if ($object->statut < 2) {
print '<tr><td colspan="9" class="opacitymedium">';
print $langs->trans("NoTargetYet");
if ($object->statut < $object::STATUS_SENTPARTIALY) {
print '<tr><td colspan="9">';
print '<span class="opacitymedium">'.$langs->trans("NoTargetYet").'</span>';
print '</td></tr>';
} else {
print '<tr><td colspan="9">';
print '<span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span>';
print '</td></tr>';
}
}

View File

@ -191,6 +191,12 @@ class Mailing extends CommonObject
public $substitutionarrayfortest;
const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;
const STATUS_SENTPARTIALY = 2;
const STATUS_SENTCOMPLETELY = 3;
/**
* Constructor
*