From 5f5719d76828f72e86f3890eaa3b9feeb6b34fa2 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 19 Dec 2002 23:13:48 +0000 Subject: [PATCH] *** empty log message *** --- htdocs/conf/conf.class.php3.sample | 8 ++++---- htdocs/main.inc.php3 | 13 ++++++++----- htdocs/pre.inc.php3 | 5 ++++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/conf/conf.class.php3.sample b/htdocs/conf/conf.class.php3.sample index e547690758f..3de1b83716d 100644 --- a/htdocs/conf/conf.class.php3.sample +++ b/htdocs/conf/conf.class.php3.sample @@ -32,6 +32,10 @@ class Conf { $this->db = new DbConf(); + $this->societe = 1; + $this->commercial = 0; + $this->voyage = 0; + $this->propal = new PropalConf(); $this->facture = new FactureConf(); $this->fichinter = new FicheInterConf(); @@ -41,15 +45,11 @@ class Conf { $this->adherent = new AdherentConf(); $this->domaine = new domaineConf(); - $this->commercial = 0; - $this->readonly = 0; $this->years = 2001; $this->css = "theme/dolibarr/dolibarr.css"; - - $this->voyage = 0; } } diff --git a/htdocs/main.inc.php3 b/htdocs/main.inc.php3 index 6efd7b74b91..db124ee9bb5 100644 --- a/htdocs/main.inc.php3 +++ b/htdocs/main.inc.php3 @@ -86,11 +86,14 @@ function top_menu($head) { print 'Accueil'; print ''; - if ($user->comm > 0) { - print 'Commercial'; - } else { - print '-'; - } + if ($user->comm > 0 && $conf->commercial ) + { + print 'Commercial'; + } + else + { + print '-'; + } print ''; if ($user->compta > 0) diff --git a/htdocs/pre.inc.php3 b/htdocs/pre.inc.php3 index 9fbc03a9b04..c0a77c3cc09 100644 --- a/htdocs/pre.inc.php3 +++ b/htdocs/pre.inc.php3 @@ -36,7 +36,10 @@ function llxHeader($head = "") { $menu->add("/societe.php", "Sociétés","company"); $menu->add_submenu("../soc.php3?&action=create", "Nouvelle société"); - $menu->add("/comm/index.php3", "Commercial"); + if ($conf->commercial ) + { + $menu->add("/comm/index.php3", "Commercial"); + } $menu->add_submenu("/comm/clients.php3", "Clients");