Merge pull request #19238 from FHenry/14_fix_deltesuppierorder

fix: warning on delete supplier order
This commit is contained in:
Laurent Destailleur 2021-10-31 13:58:52 +01:00 committed by GitHub
commit c1a046601c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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');