Fix bad test

This commit is contained in:
Laurent Destailleur 2026-06-25 12:49:22 +02:00
parent 65c54a02b8
commit e4710357e4

View file

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