diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 01494955feb..e2291812b83 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -605,7 +605,6 @@ if ($object->id > 0) print ''.$langs->trans("DateProcess").''; print ' '; print ''; - $var=true; if ($result_sql) { @@ -615,7 +614,6 @@ if ($object->id > 0) { $obj = $db->fetch_object($result_sql); - print ''; print ''.dol_print_date($db->jdate($obj->date_demande),'day')."\n"; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; @@ -660,6 +658,7 @@ if ($object->id > 0) if ($result) { $num = $db->num_rows($result); + $numclosed = $num; $i = 0; while ($i < $num) @@ -690,8 +689,10 @@ if ($object->id > 0) print "\n"; $i++; } - if (! $num) + + if (! $numclosed) print ''.$langs->trans("None").''; + $db->free($result); } else