dolibarr/htdocs/compta/pre.inc.php

132 lines
3.7 KiB
PHP
Raw Normal View History

<?php
2005-01-17 10:19:11 +01:00
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
2002-04-30 12:44:42 +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-06-26 02:03:47 +02:00
* $Id$
* $Source$
*
2002-04-30 12:44:42 +02:00
*/
2004-11-16 21:43:08 +01:00
2005-01-17 10:19:11 +01:00
/**
\file htdocs/compta/pre.inc.php
\ingroup compta
\brief Fichier gestionnaire du menu compta
2004-11-16 21:43:08 +01:00
*/
2003-09-11 22:18:51 +02:00
require("../main.inc.php");
2002-04-30 12:44:42 +02:00
2004-07-27 15:58:40 +02:00
function llxHeader($head = "", $title="", $help_url='')
{
global $user, $conf, $langs;
2004-12-02 17:24:16 +01:00
$user->getrights('banque');
2003-09-10 15:03:59 +02:00
top_menu($head, $title);
2002-05-04 01:01:45 +02:00
2002-05-09 16:57:48 +02:00
$menu = new Menu();
2002-05-04 01:01:45 +02:00
// Les recettes
2004-11-16 21:43:08 +01:00
$menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
2003-02-03 13:31:06 +01:00
if ($conf->propal->enabled)
{
2004-11-16 21:43:08 +01:00
$langs->load("propal");
$menu->add(DOL_URL_ROOT."/compta/propal.php",$langs->trans("Prop"));
}
if ($conf->contrat->enabled)
{
2004-11-16 21:43:08 +01:00
$langs->load("contracts");
$menu->add(DOL_URL_ROOT."/contrat/",$langs->trans("Contracts"));
}
2003-03-23 18:25:47 +01:00
if ($conf->don->enabled)
{
2004-11-16 21:43:08 +01:00
$langs->load("donations");
$menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations"));
2003-03-23 18:25:47 +01:00
}
2002-12-20 19:20:06 +01:00
if ($conf->facture->enabled)
{
2004-11-16 21:43:08 +01:00
$langs->load("bills");
$menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
2005-01-19 23:52:12 +01:00
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"));
2004-11-16 21:43:08 +01:00
$menu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments"));
2004-12-16 10:30:40 +01:00
if (! defined(FACTURE_DISABLE_RECUR) || ! FACTURE_DISABLE_RECUR)
{
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php","R<EFBFBD>currentes");
}
2005-01-17 10:19:11 +01:00
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"));
}
2005-01-17 10:19:11 +01:00
// Les d<>penses
if ($conf->fournisseur->enabled)
2004-11-16 21:43:08 +01:00
{
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
if ($conf->deplacement->enabled && $user->societe_id == 0)
{
$menu->add(DOL_URL_ROOT."/compta/deplacement/", "D<EFBFBD>placement");
}
2003-03-23 16:16:29 +01:00
if ($conf->compta->enabled && $conf->compta->tva && $user->societe_id == 0)
2002-12-30 21:20:27 +01:00
{
2004-11-16 21:43:08 +01:00
$menu->add(DOL_URL_ROOT."/compta/tva/index.php",$langs->trans("VAT"));
2002-12-30 21:20:27 +01:00
}
if ($conf->compta->enabled)
{
2004-12-16 10:30:40 +01:00
$menu->add(DOL_URL_ROOT."/compta/charges/index.php","Charges");
}
// Vision des recettes-d<>penses
2004-07-29 16:19:41 +02:00
if ($conf->banque->enabled && $user->rights->banque->lire)
{
2004-12-19 01:44:00 +01:00
$langs->load("banks");
2004-11-16 21:43:08 +01:00
$menu->add(DOL_URL_ROOT."/compta/bank/",$langs->trans("Bank"));
}
2004-07-29 16:19:41 +02:00
if ($conf->caisse->enabled)
{
$menu->add(DOL_URL_ROOT."/compta/caisse/index.php","Caisses");
}
2002-06-26 02:03:47 +02:00
$menu->add(DOL_URL_ROOT."/compta/stats/","CA / R<>sultats");
if ($conf->prelevement->enabled)
2004-09-28 17:13:54 +02:00
{
2005-01-17 10:23:47 +01:00
$menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("Withdrawls"));
2004-09-28 17:13:54 +02:00
}
2004-12-06 13:57:04 +01:00
$menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
2004-12-02 17:24:16 +01:00
if ($user->rights->compta->ventilation->param)
$menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param"));
2002-06-26 02:03:47 +02:00
2004-07-27 15:58:40 +02:00
left_menu($menu->liste, $help_url);
2002-04-30 12:44:42 +02:00
}
2002-04-30 17:36:13 +02:00
2002-04-30 12:44:42 +02:00
?>