2004-10-19 22:35:36 +02:00
|
|
|
|
<?php
|
2003-02-03 14:15:41 +01:00
|
|
|
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2004-02-15 04:12:50 +01:00
|
|
|
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
2002-05-11 20:53:13 +02:00
|
|
|
|
*
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
*
|
2002-12-22 16:14:11 +01:00
|
|
|
|
* $Id$
|
|
|
|
|
|
* $Source$
|
2002-05-11 20:53:13 +02:00
|
|
|
|
*/
|
2004-08-14 15:27:17 +02:00
|
|
|
|
|
|
|
|
|
|
/*! \file htdocs/compta/bank/config.php
|
|
|
|
|
|
\ingroup banque
|
|
|
|
|
|
\brief Page de configuration des comptes bancaires
|
|
|
|
|
|
\version $Revision$
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2003-09-11 22:18:51 +02:00
|
|
|
|
require("./pre.inc.php");
|
|
|
|
|
|
require("./bank.lib.php");
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
2003-11-05 10:59:16 +01:00
|
|
|
|
$user->getrights('compta');
|
2004-06-11 02:54:19 +02:00
|
|
|
|
$user->getrights('banque');
|
2003-11-05 10:59:16 +01:00
|
|
|
|
|
|
|
|
|
|
if (!$user->admin && !$user->rights->compta->bank)
|
|
|
|
|
|
accessforbidden();
|
|
|
|
|
|
|
2002-05-11 20:53:13 +02:00
|
|
|
|
llxHeader();
|
|
|
|
|
|
|
2004-06-11 02:54:19 +02:00
|
|
|
|
print_titre("Configuration des comptes");
|
2004-06-09 19:50:28 +02:00
|
|
|
|
print '<br>';
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
2004-02-15 03:59:02 +01:00
|
|
|
|
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="2">';
|
|
|
|
|
|
print "<tr class=\"liste_titre\">";
|
2004-08-14 15:27:17 +02:00
|
|
|
|
print "<td>id</td><td>Label</td><td>".$langs->trans("Description")."</td>";
|
|
|
|
|
|
print "<td align=\"left\">".$langs->trans("Number")."</a></td>";
|
|
|
|
|
|
print "<td align=\"center\">Clos</a></td>";
|
2004-02-15 03:59:02 +01:00
|
|
|
|
print "</tr>\n";
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
2004-02-01 02:50:21 +01:00
|
|
|
|
$sql = "SELECT rowid, label,number,bank,clos from ".MAIN_DB_PREFIX."bank_account";
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
$result = $db->query($sql);
|
2004-08-03 21:52:57 +02:00
|
|
|
|
$var=false;
|
2003-02-03 14:15:41 +01:00
|
|
|
|
if ($result)
|
|
|
|
|
|
{
|
2002-05-11 20:53:13 +02:00
|
|
|
|
$var=True;
|
|
|
|
|
|
$num = $db->num_rows();
|
|
|
|
|
|
$i = 0; $total = 0;
|
|
|
|
|
|
|
|
|
|
|
|
$sep = 0;
|
|
|
|
|
|
|
|
|
|
|
|
while ($i < $num) {
|
2004-10-23 18:55:07 +02:00
|
|
|
|
$objp = $db->fetch_object($result);
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
2004-08-03 21:52:57 +02:00
|
|
|
|
$var=!$var;
|
2004-08-14 15:27:17 +02:00
|
|
|
|
print "<tr $bc[$var]><td>$objp->rowid</td><td><a href=\"fiche.php?id=$objp->rowid\">$objp->label</a></td>";
|
|
|
|
|
|
print "<td>$objp->bank </td><td>$objp->number </td><td align=\"center\">".$yn[$objp->clos]."</td></tr>";
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
}
|
|
|
|
|
|
$db->free();
|
|
|
|
|
|
}
|
|
|
|
|
|
print "</table>";
|
|
|
|
|
|
|
2002-12-24 01:08:44 +01:00
|
|
|
|
|
2004-06-11 02:54:19 +02:00
|
|
|
|
/*
|
|
|
|
|
|
* Boutons d'actions
|
|
|
|
|
|
*/
|
2004-02-15 03:59:02 +01:00
|
|
|
|
print "<br><div class=\"tabsAction\">\n";
|
|
|
|
|
|
if ($user->rights->banque->configurer) {
|
|
|
|
|
|
print '<a class="tabAction" href="fiche.php?action=create">Nouveau compte</a>';
|
|
|
|
|
|
print '<a class="tabAction" href="categ.php">Cat<61>gories</a>';
|
|
|
|
|
|
}
|
|
|
|
|
|
print "</div>";
|
2002-05-11 20:53:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$db->close();
|
|
|
|
|
|
|
|
|
|
|
|
llxFooter(strftime("%H:%M",time()). " - <em>Dernière modification $Date$ révision $Revision$</em>");
|
|
|
|
|
|
?>
|