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

@@ -459,7 +459,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';
}
@@ -880,7 +880,7 @@ if ($resql) {
'builddoc'=>$langs->trans("PDFMerge"),
'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 ($user->rights->fournisseur->commande->supprimer) {