dolibarr/htdocs/fourn/commande/pre.inc.php

75 lines
2.2 KiB
PHP
Raw Normal View History

2004-11-29 10:53:33 +01:00
<?PHP
2005-04-05 10:31:10 +02:00
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2005-01-09 18:35:22 +01:00
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
2004-11-29 10:53:33 +01: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.
*
* $Id$
* $Source$
*
*/
2005-01-09 18:35:22 +01:00
2005-04-05 10:31:10 +02:00
/**
\file htdocs/fourn/commande/pre.inc.php
\ingroup compta
\brief Fichier gestionnaire du menu commandes fournisseurs
2005-01-09 18:35:22 +01:00
*/
2004-11-29 10:53:33 +01:00
require("../../main.inc.php");
2005-04-05 12:25:50 +02:00
$langs->load("orders");
$langs->load("suppliers");
$langs->load("companies");
2004-11-29 10:53:33 +01:00
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php");
2004-11-30 20:27:07 +01:00
2005-04-11 17:32:06 +02:00
function llxHeader($head = "", $title = "", $help_url='', $addons='')
2004-11-29 10:53:33 +01:00
{
global $user, $langs;
$langs->load("orders");
/*
*
*
*/
2004-11-29 16:33:30 +01:00
top_menu($head, $title);
2004-11-29 10:53:33 +01:00
$menu = new Menu();
2005-04-11 17:32:06 +02:00
if (is_array($addons))
{
$menu->add($addons[0][0], $addons[0][1]);
}
2005-07-23 16:48:58 +02:00
if ($user->societe_id == 0 && $user->rights->societe->lire)
{
2005-04-05 10:31:10 +02:00
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
2005-07-23 16:48:58 +02:00
}
2004-11-29 10:53:33 +01:00
2005-04-04 18:13:00 +02:00
$langs->load("bills");
2005-07-23 16:48:58 +02:00
if ($user->rights->fournisseur->facture->lire)
{
2005-04-04 18:13:00 +02:00
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
2005-07-23 16:48:58 +02:00
}
if ($user->rights->fournisseur->commande->lire)
{
2005-04-05 10:31:10 +02:00
$menu->add(DOL_URL_ROOT."/fourn/commande/", $langs->trans("Orders"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/commande/liste.php", $langs->trans("List"));
2005-07-23 16:48:58 +02:00
}
2005-04-05 10:31:10 +02:00
2005-04-11 17:32:06 +02:00
left_menu($menu->liste,$help_url);
2004-11-29 10:53:33 +01:00
}
?>