diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index b9ea4fc0e54..8dbba002b98 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -158,8 +158,8 @@ if (empty($reshook)) {
// Mass actions
$objectclass = 'AccountingAccount';
- $permissiontoread = $user->rights->accounting->read;
- $permissiontodelete = $user->rights->accounting->delete;
+ $permissiontoread = $user->hasRight('accounting','read');
+ $permissiontodelete = $user->hasRight('accounting','delete');
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -469,7 +469,7 @@ if ($result) {
print ''.$langs->trans("DescVentilTodoCustomer").'
';
- if ($msg) {
+ if (!empty($msg)) {
print $msg.'
';
}