Exclus les comptes clos des listes de choix
This commit is contained in:
parent
1ddbd083f4
commit
7453c2ff8d
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/bank/virement.php
|
\file htdocs/compta/bank/virement.php
|
||||||
\ingroup banque
|
\ingroup banque
|
||||||
\brief Page de saisie d'un virement
|
\brief Page de saisie d'un virement
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -105,37 +105,41 @@ $var=false;
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print "<select class=\"flat\" name=\"account_from\">";
|
print "<select class=\"flat\" name=\"account_from\">";
|
||||||
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account";
|
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
$result = $db->query($sql);
|
$sql .= " WHERE clos = 0";
|
||||||
if ($result)
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
{
|
{
|
||||||
$var=True;
|
$var=True;
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0; $total = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($resql);
|
||||||
print "<option value=\"$objp->rowid\">$objp->label</option>";
|
print "<option value=\"$objp->rowid\">$objp->label</option>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
print "</select></td><td>\n";
|
print "</select></td><td>\n";
|
||||||
|
|
||||||
print "<select class=\"flat\" name=\"account_to\">";
|
print '<select class="flat" name="account_to">';
|
||||||
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account";
|
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
$result = $db->query($sql);
|
$sql .= " WHERE clos = 0";
|
||||||
if ($result)
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
{
|
{
|
||||||
$var=True;
|
$var=True;
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0; $total = 0;
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($resql);
|
||||||
print "<option value=\"$objp->rowid\">$objp->label</option>";
|
print "<option value=\"$objp->rowid\">$objp->label</option>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
print "</select></td>\n";
|
print "</select></td>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user