2
0
forked from Wavyzz/dolibarr

Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0

Conflicts:
	htdocs/adherents/subscription.php
	htdocs/core/lib/security.lib.php
	htdocs/expensereport/card.php
This commit is contained in:
Laurent Destailleur
2022-05-24 16:27:26 +02:00
3 changed files with 6 additions and 6 deletions

View File

@@ -1061,12 +1061,12 @@ if ($rowid > 0) {
// Bank account // Bank account
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>'; print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>';
print img_picto('', 'bank_account'); print img_picto('', 'bank_account');
$form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2); $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2, '', 0, 'minwidth200');
print "</td></tr>\n"; print "</td></tr>\n";
// Payment mode // Payment mode
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>'; print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST('operation'), 'operation', '', 2); $form->select_types_paiements(GETPOST('operation'), 'operation', '', 2, 1, 0, 0, 1, 'minwidth200');
print "</td></tr>\n"; print "</td></tr>\n";
// Date of payment // Date of payment

View File

@@ -52,7 +52,7 @@ $hookmanager->initHooks(array('paymentcard', 'globalcard'));
// Load object // Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. 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 // Security check
if ($user->socid) { if ($user->socid) {

View File

@@ -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"); //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 "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)."<br>"; //print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."<br>";
$parentfortableentity = ''; $parentfortableentity = '';
@@ -494,8 +494,8 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
if (!$user->rights->fournisseur->facture->creer) { if (!$user->rights->fournisseur->facture->creer) {
$deleteok = 0; $deleteok = 0;
} }
} elseif ($feature == 'payment') { // Permission to delete a payment of an invoice is permission to edit an invoice. } elseif ($feature == 'payment') {
if (!$user->rights->facture->creer) { if (!$user->rights->facture->paiement) {
$deleteok = 0; $deleteok = 0;
} }
} elseif ($feature == 'banque') { } elseif ($feature == 'banque') {