Fix: Missing test if module supplier is on

This commit is contained in:
Laurent Destailleur 2011-01-23 16:57:24 +00:00
parent f91de5949c
commit 1779f59b08

View File

@ -44,7 +44,8 @@ function societe_prepare_head($object)
$head[$h][2] = 'card'; $head[$h][2] = 'card';
$h++; $h++;
if ($object->client==2 || $object->client==3 || $object->object->client==2 || $object->object->client==3) // TODO Remove tests on object->object. Functions must be called with a company object directly
if (($object->client==2 || $object->client==3 || $object->object->client==2 || $object->object->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Prospect"); $head[$h][1] = $langs->trans("Prospect");
@ -58,7 +59,7 @@ function societe_prepare_head($object)
$head[$h][2] = 'customer'; $head[$h][2] = 'customer';
$h++; $h++;
} }
if ($object->fournisseur || $object->object->fournisseur) if ($conf->fournisseur->enabled && ($object->fournisseur || $object->object->fournisseur))
{ {
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Supplier"); $head[$h][1] = $langs->trans("Supplier");