diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index d9ab62336a1..04925dc0c0f 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -1061,12 +1061,12 @@ if ($rowid > 0) {
// Bank account
print '
| '.$langs->trans("FinancialAccount").' | ';
print img_picto('', 'bank_account');
- $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2);
+ $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2, '', 0, 'minwidth200');
print " |
\n";
// Payment mode
print '| '.$langs->trans("PaymentMode").' | ';
- $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2);
+ $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200');
print " |
\n";
// Date of payment
diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index e798eecaefa..2c31d37faa5 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -52,7 +52,7 @@ $hookmanager->initHooks(array('paymentcard', 'globalcard'));
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
-$result = restrictedArea($user, $object->element, $object->id, 'paiement', '');
+$result = restrictedArea($user, $object->element, $object->id, 'paiement');
// Security check
if ($user->socid) {
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index c0c540754fc..a3330d0562e 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -196,7 +196,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
//dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
//print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", objectid=".$objectid;
- //print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
+ //print ", dbtablename=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
//print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."
";
$parentfortableentity = '';
@@ -494,8 +494,8 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
if (!$user->rights->fournisseur->facture->creer) {
$deleteok = 0;
}
- } elseif ($feature == 'payment') { // Permission to delete a payment of an invoice is permission to edit an invoice.
- if (!$user->rights->facture->creer) {
+ } elseif ($feature == 'payment') {
+ if (!$user->rights->facture->paiement) {
$deleteok = 0;
}
} elseif ($feature == 'banque') {