diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 18eb9a63608..6bc4fe53c8a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2714,7 +2714,7 @@ class CommandeFournisseur extends CommonOrder public function Livraison($user, $date, $type, $comment) { // phpcs:enable - global $conf, $langs; + global $langs; $result = 0; $error = 0; @@ -2759,7 +2759,7 @@ class CommandeFournisseur extends CommonOrder } if (!$error && getDolGlobalString('SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE') && ($type == 'tot')) { // Accept to move to reception done, only if status of all line are ok (refuse denied) $dispatcheddenied = $this->getDispachedLines(2); - if (count($dispatchedlinearray) > 0) { + if (count($dispatcheddenied) > 0) { $result = -1; $error++; $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionDenied';