2
0
forked from Wavyzz/dolibarr

Category contact again

This commit is contained in:
Florian Henry
2013-07-30 17:28:08 +02:00
parent 60bb595248
commit 3a2f76512b

View File

@@ -72,25 +72,32 @@ if ($id > 0 && $removeelem > 0)
$result = $tmpobject->fetch($removeelem);
$elementtype = 'product';
}
if ($type==1 && $user->rights->societe->creer)
else if ($type==1 && $user->rights->societe->creer)
{
$tmpobject = new Societe($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'fournisseur';
}
if ($type==2 && $user->rights->societe->creer)
else if ($type==2 && $user->rights->societe->creer)
{
$tmpobject = new Societe($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'societe';
}
if ($type == 3 && $user->rights->adherent->creer)
else if ($type == 3 && $user->rights->adherent->creer)
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$tmpobject = new Adherent($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'member';
}
else if ($type == 4 && $user->rights->societe->creer) {
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$tmpobject = new Contact($db);
$result = $tmpobject->fetch($removeelem);
$elementtype = 'contact';
}
$result=$object->del_type($tmpobject,$elementtype);
if ($result < 0) dol_print_error('',$object->error);