Fix: compatibility with multicompany sharings

This commit is contained in:
Regis Houssin 2012-10-16 17:53:37 +02:00
parent 6d85629495
commit d9ebc43cb6
2 changed files with 3 additions and 2 deletions

View File

@ -61,6 +61,7 @@ if ($id || $ref)
$elementtype = 'fournisseur';
$objecttype = 'societe&categorie';
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
$dbtablename = '&societe';
$fieldid = 'rowid';
}
if ($type == 2) {

View File

@ -44,7 +44,7 @@ $action = GETPOST('action');
// Security check
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
if ($user->societe_id) $id=$user->societe_id;
$result = restrictedArea($user, 'societe&fournisseur', $id, '');
$result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
$object = new Fournisseur($db);
@ -403,7 +403,7 @@ if ($object->fetch($id))
// List of contacts
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
}
// Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
{