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

@@ -1983,7 +1983,7 @@ if ($action == 'create') {
// Create bill
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && ($object->statut == Reception::STATUS_VALIDATED || $object->statut == Reception::STATUS_CLOSED)) {
if ($user->rights->fournisseur->facture->creer) {
if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) {
// TODO show button only if (! empty($conf->global->WORKFLOW_BILL_ON_RECEPTION))
// If we do that, we must also make this option official.
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';