diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index e2291812b83..16e24b2b7b0 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -520,6 +520,7 @@ if ($object->id > 0) dol_fiche_end(); + $numopen = 0; $numclosed = 0; /* * Withdrawal opened requests @@ -540,6 +541,7 @@ if ($object->id > 0) if ($result_sql) { $num = $db->num_rows($result_sql); + $numopen = $num; } @@ -690,7 +692,7 @@ if ($object->id > 0) $i++; } - if (! $numclosed) + if (! $numopen && ! $numclosed) print ''.$langs->trans("None").''; $db->free($result);