Fix Check right for service for arrayofmassaction
if product module disable, threre is no action for service
This commit is contained in:
parent
36e6036e9e
commit
2d67c2365f
@ -424,13 +424,13 @@ if ($resql)
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->produit->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
$rightskey='produit';
|
||||
if($type == Product::TYPE_SERVICE) $rightskey='service';
|
||||
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
$rightskey='produit';
|
||||
if($type == Product::TYPE_SERVICE) $rightskey='service';
|
||||
if($user->rights->{$rightskey}->creer)
|
||||
{
|
||||
$label='NewProduct';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user