2
0
forked from Wavyzz/dolibarr

Add right supplier_invoice

This commit is contained in:
Alexandre SPANGARO
2021-04-12 07:37:34 +02:00
parent 2a1a22763d
commit 87cc1b2601
17 changed files with 69 additions and 45 deletions

View File

@@ -384,7 +384,7 @@ if (empty($reshook)) {
// Fac builddoc
$donotredirect = 1;
$upload_dir = $conf->fournisseur->facture->dir_output;
$permissiontoadd = $user->rights->fournisseur->facture->creer;
$permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer);
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
}
@@ -596,7 +596,7 @@ $arrayofmassactions = array(
// 'presend'=>$langs->trans("SendByMail"),
);
if ($user->rights->fournisseur->facture->creer) {
if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) {
$arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier");
}
if ($massaction == 'createbills') {