[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/compta/bank/ -> config.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: config.php,v 1.21 2005/10/15 15:32:02 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/bank/config.php,v $
  21   */
  22  
  23  /**
  24     \file       htdocs/compta/bank/config.php
  25     \ingroup    banque
  26     \brief      Page de configuration des comptes bancaires
  27     \version    $Revision: 1.21 $
  28  */
  29  
  30  require ("./pre.inc.php");
  31  require ("./bank.lib.php");
  32  
  33  if (!$user->rights->banque->configurer)
  34    accessforbidden();
  35  
  36  llxHeader();
  37  
  38  print_titre($langs->trans("AccountSetup"));
  39  print '<br>';
  40  print '<table class="noborder" width="100%">';
  41  print '<tr class="liste_titre">';
  42  print '<td>'.$langs->trans("Ref")."</td><td>".$langs->trans("Type")."</td><td>".$langs->trans("Bank").'</td>';
  43  print '<td align="left">'.$langs->trans("AccountIdShort").'</a></td>';
  44  print '<td align="center">'.$langs->trans("Conciliable").'</a></td>';
  45  print '<td align="center">'.$langs->trans("Status").'</a></td>';
  46  print "</tr>\n";
  47  
  48  $sql = "SELECT rowid, label, number, bank, courant as type, clos, rappro";
  49  $sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
  50  $sql.= " ORDER BY label";
  51  
  52  $result = $db->query($sql);
  53  $var=false;
  54  if ($result)
  55  {
  56    $account=new Account($db);
  57    
  58    $var=True;  
  59    $num = $db->num_rows($result);
  60    $i = 0; $total = 0;
  61  
  62    $sep = 0;
  63  
  64    while ($i < $num) {
  65      $objp = $db->fetch_object($result);
  66  
  67      $var=!$var;
  68      print '<tr '.$bc[$var].'><td><a href="fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</td>';
  69      print '<td>'.$account->type_lib[$objp->type].'</td>';
  70      print '<td>'.$objp->bank.'&nbsp;</td><td>'.$objp->number.'&nbsp;</td>';
  71      print '<td align="center">'.yn($objp->rappro).'</td>';
  72      print '<td align="center">'.$account->status[$objp->clos].'</td></tr>';
  73  
  74      $i++;
  75    }
  76    $db->free($result);
  77  }
  78  print "</table>";
  79  
  80  
  81  /*
  82   * Boutons d'actions
  83   */
  84  print "<br><div class=\"tabsAction\">\n";
  85  if ($user->rights->banque->configurer)
  86  {
  87    print '<a class="tabAction" href="fiche.php?action=create">'.$langs->trans("NewFinancialAccount").'</a>';
  88    print '<a class="tabAction" href="categ.php">'.$langs->trans("Categories").'</a>';
  89  }
  90  print "</div>";
  91  
  92  $db->close();
  93  
  94  llxFooter('$Date: 2005/10/15 15:32:02 $ - $Revision: 1.21 $');
  95  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics