From 0143eb7b0ae55497df02385fb2ab584d9c7dc03a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Mar 2011 13:18:01 +0000 Subject: [PATCH] Fix: Fix option to disable customer features --- htdocs/societe/class/societe.class.php | 4 ++-- htdocs/societe/index.php | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 56819f98313..516981889a4 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1349,7 +1349,7 @@ class Societe extends CommonObject * @param maxlen Max length of text * @return string String with URL */ - function getNomUrl($withpicto=0,$option='customer',$maxlen=0) + function getNomUrl($withpicto=0,$option='',$maxlen=0) { global $conf,$langs; @@ -1358,7 +1358,7 @@ class Societe extends CommonObject if ($option == 'customer' || $option == 'compta') { - if ($this->client == 1 && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) // Only customer + if (($this->client == 1 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) // Only customer { $lien = ''; print ''; /* - * Zone recherche tiers + * Search area */ $rowspan=2; print '
'; @@ -72,7 +72,7 @@ print "

"; /* - * Nombre de tiers + * Statistics area */ $third = array(); $total=0; @@ -181,17 +181,20 @@ if ($result) print ''; if ($thirdparty_static->client==1 || $thirdparty_static->client==3) { - print "
id."\">".$langs->trans("Customer")."\n"; + $thirdparty_static->name=$langs->trans("Customer"); + print $thirdparty_static->getNomUrl(0,'customer'); } if ($thirdparty_static->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / "; if (($thirdparty_static->client==2 || $thirdparty_static->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { - print "id."\">".$langs->trans("Prospect")."\n"; + $thirdparty_static->name=$langs->trans("Prospect"); + print $thirdparty_static->getNomUrl(0,'prospect'); } if ($conf->fournisseur->enabled && $thirdparty_static->fournisseur) { if ($thirdparty_static->client) print " / "; - print ''.$langs->trans("Supplier").''; + $thirdparty_static->name=$langs->trans("Supplier"); + print $thirdparty_static->getNomUrl(0,'supplier'); } print ''; // Last modified date