fix: warning on delete wupplier order

This commit is contained in:
Florian HENRY 2021-10-28 17:37:30 +02:00
parent 82a35f82b4
commit 9d15a7a18c

View File

@ -2084,7 +2084,7 @@ class CommandeFournisseur extends CommonOrder
// Test we can delete
$this->fetchObjectLinked(null, 'order_supplier');
if (!empty($this->linkedObjects)) {
if (!empty($this->linkedObjects) && array_key_exists('reception', $this->linkedObjects)) {
foreach ($this->linkedObjects['reception'] as $element) {
if ($element->statut >= 0) {
$this->errors[] = $langs->trans('ReceptionExist');