diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index b6e0dbb9daa..98bfc29f057 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -22,10 +22,10 @@ */ /** - \file htdocs/compta/bank/virement.php - \ingroup banque - \brief Page de saisie d'un virement - \version $Revision$ + \file htdocs/compta/bank/virement.php + \ingroup banque + \brief Page de saisie d'un virement + \version $Revision$ */ require("./pre.inc.php"); @@ -105,37 +105,41 @@ $var=false; print ''; print "\n"; -print "'; $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account"; -$result = $db->query($sql); -if ($result) +$sql .= " WHERE clos = 0"; +$resql = $db->query($sql); +if ($resql) { $var=True; $num = $db->num_rows(); - $i = 0; $total = 0; - - while ($i < $num) - { - $objp = $db->fetch_object($result); - print ""; - $i++; - } + $i = 0; + + while ($i < $num) + { + $objp = $db->fetch_object($resql); + print ""; + $i++; + } + $db->free($resql); } print "\n";