remove overkill setEventMessage()

This commit is contained in:
Thomas Negre
2022-07-08 15:47:13 +02:00
parent 56ea6989cf
commit f042a62a1c

View File

@@ -759,11 +759,9 @@ class Reception extends CommonObject
$langs->load("errors"); $langs->load("errors");
if (!empty($product->status_batch) && empty($batch)) { if (!empty($product->status_batch) && empty($batch)) {
$this->error = $langs->trans('ErrorProductNeedBatchNumber', $product->ref); $this->error = $langs->trans('ErrorProductNeedBatchNumber', $product->ref);
setEventMessages($this->error, $this->errors, 'errors');
return -1; return -1;
} elseif (empty($product->status_batch) && !empty($batch)) { } elseif (empty($product->status_batch) && !empty($batch)) {
$this->error = $langs->trans('ErrorProductDoesNotNeedBatchNumber', $product->ref); $this->error = $langs->trans('ErrorProductDoesNotNeedBatchNumber', $product->ref);
setEventMessages($this->error, $this->errors, 'errors');
return -1; return -1;
} }
} }