*** empty log message ***
This commit is contained in:
parent
fb7ad236b3
commit
69f562d555
@ -22,7 +22,8 @@
|
||||
|
||||
require("../../main.inc.php3");
|
||||
require("./account.class.php3");
|
||||
function llxHeader($head = "") {
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
global $user, $conf, $account;
|
||||
|
||||
/*
|
||||
@ -39,19 +40,21 @@ function llxHeader($head = "") {
|
||||
$db = new Db();
|
||||
$sql = "SELECT rowid, label FROM llx_bank_account";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
if ($result)
|
||||
{
|
||||
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($i);
|
||||
$menu->add("account.php3?account=" . $objp->rowid, $objp->label);
|
||||
$menu->add_submenu("releve.php3?account=" . $objp->rowid ,"Relevés");
|
||||
$menu->add_submenu("rappro.php3?account=".$objp->rowid,"Rappro");
|
||||
$i++;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($i);
|
||||
$menu->add("account.php3?account=" . $objp->rowid, $objp->label);
|
||||
$menu->add_submenu("releve.php3?account=" . $objp->rowid ,"Relevés");
|
||||
$menu->add_submenu("rappro.php3?account=".$objp->rowid,"Rappro");
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->close;
|
||||
|
||||
$menu->add("index.php3","Bank");
|
||||
|
||||
@ -1,5 +1,20 @@
|
||||
<?PHP
|
||||
/*
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
@ -14,7 +29,8 @@ llxHeader();
|
||||
$db = new Db();
|
||||
|
||||
|
||||
if ($action == 'add') {
|
||||
if ($action == 'add')
|
||||
{
|
||||
$author = $GLOBALS["REMOTE_USER"];
|
||||
|
||||
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)";
|
||||
@ -22,35 +38,25 @@ if ($action == 'add') {
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
print $db->error();
|
||||
print "<p>$sql";
|
||||
}
|
||||
if (!$result)
|
||||
{
|
||||
print $db->error();
|
||||
print "<p>$sql";
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)";
|
||||
$sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$account_to)";
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
print $db->error();
|
||||
print "<p>$sql";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if ($action == 'del') {
|
||||
bank_delete_line($db, $rowid);
|
||||
if (!$result)
|
||||
{
|
||||
print $db->error();
|
||||
print "<p>$sql";
|
||||
}
|
||||
}
|
||||
|
||||
if ($vline) {
|
||||
$viewline = $vline;
|
||||
} else {
|
||||
$viewline = 20;
|
||||
}
|
||||
|
||||
print "<b>Virement</b> - <a href=\"$PHP_SELF\">Reload</a> -";
|
||||
print "<a href=\"$PHP_SELF?viewall=1\">Voir tout</a>";
|
||||
print_titre("Virement");
|
||||
|
||||
print "<form method=\"post\" action=\"$PHP_SELF?viewall=$viewall&vline=$vline&account=$account\">";
|
||||
|
||||
@ -62,48 +68,51 @@ print "<tr><td>";
|
||||
print "<select name=\"account_from\">";
|
||||
$sql = "SELECT rowid, label FROM llx_bank_account";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
if ($result)
|
||||
{
|
||||
$var=True;
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($i);
|
||||
print "<option value=\"$objp->rowid\">$objp->label</option><br>";
|
||||
$i++;
|
||||
}
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($i);
|
||||
print "<option value=\"$objp->rowid\">$objp->label</option><br>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</select></td><td>";
|
||||
|
||||
print "<select name=\"account_to\">";
|
||||
$sql = "SELECT rowid, label FROM llx_bank_account";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
if ($result)
|
||||
{
|
||||
$var=True;
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($i);
|
||||
print "<option value=\"$objp->rowid\">$objp->label</option><br>";
|
||||
$i++;
|
||||
}
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($i);
|
||||
print "<option value=\"$objp->rowid\">$objp->label</option><br>";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</select></td>";
|
||||
|
||||
print "<td><input name=\"dateo\" type=\"text\" size=8 maxlength=8></td>";
|
||||
print "<td><input name=\"label\" type=\"text\" size=40></td>";
|
||||
print "<td><input name=\"amount\" type=\"text\" size=8></td>";
|
||||
print "<td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"ajouter\"</td>";
|
||||
print "</tr><tr><td colspan=\"2\">Format : YYYYMMDD - 20010826</td><td colspan=\"2\">0000.00</td></tr>";
|
||||
|
||||
print '<tr><td colspan="4" align="center"><input type="submit" value="ajouter"</td></tr>';
|
||||
|
||||
print "</table></form>";
|
||||
|
||||
print "<a href=\"categ.php3\">Edit Categories</a>";
|
||||
print " <a href=\"budget.php3\">Budgets</a>";
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter(strftime("%H:%M",time()). " - <em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter(" - <em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user