diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index 232444b7d97..b0e813be970 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -314,7 +314,6 @@ if ($action != 'export_csv')
if (empty($accountingaccountstatic->account_number)) {
$link = ''.img_edit_add().'';
}
- print '
';
if (!empty($show_subgroup))
{
@@ -343,6 +342,7 @@ if ($action != 'export_csv')
}
}
+ print '
';
print '| '.$accounting_account.' | ';
print ''.price($opening_balance).' | ';
print ''.price($line->debit).' | ';
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 86b8b62fc81..648ce4840fe 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -261,6 +261,9 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+$rightskey = 'produit';
+if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
+
if (empty($reshook))
{
// Selection of new fields
@@ -299,8 +302,8 @@ if (empty($reshook))
if ((string) $search_type == '1') { $objectlabel = 'Services'; }
if ((string) $search_type == '0') { $objectlabel = 'Products'; }
- $permissiontoread = $user->rights->produit->lire;
- $permissiontodelete = $user->rights->produit->supprimer;
+ $permissiontoread = $user->rights->{$rightskey}->lire;
+ $permissiontodelete = $user->rights->{$rightskey}->supprimer;
$uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -530,6 +533,7 @@ if ($resql)
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
+
$rightskey = 'produit';
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "".$langs->trans("Delete");
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 988f16a962a..4438a9ce217 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -454,7 +454,7 @@ $arrayofmassactions = array(
);
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
if ($user->rights->projet->creer) $arrayofmassactions['close'] = $langs->trans("Close");
-if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete");
+if ($user->rights->projet->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete");
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);