FIX: remove order rights on invoice page

This commit is contained in:
delcroix Patrick
2017-08-09 23:15:49 +02:00
committed by GitHub
parent 0960473c9b
commit e96eadb5e7

View File

@@ -269,7 +269,7 @@ if (empty($reshook))
} }
// Set supplier ref // Set supplier ref
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer) if ($action == 'setref_supplier' && $user->rights->fournisseur->facture->creer)
{ {
$object->ref_supplier = GETPOST('ref_supplier', 'alpha'); $object->ref_supplier = GETPOST('ref_supplier', 'alpha');
@@ -297,13 +297,13 @@ if (empty($reshook))
} }
// payments conditions // payments conditions
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer) if ($action == 'setconditions' && $user->rights->fournisseur->facture->creer)
{ {
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int')); $result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
} }
// payment mode // payment mode
else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) else if ($action == 'setmode' && $user->rights->fournisseur->facture->creer)
{ {
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
} }
@@ -1989,8 +1989,8 @@ else
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
// Ref supplier // Ref supplier
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', null, null, '', 1);
// Thirdparty // Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project // Project
@@ -1998,7 +1998,7 @@ else
{ {
$langs->load("projects"); $langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' '; $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->fournisseur->commande->creer) if ($user->rights->fournisseur->facture->creer)
{ {
if ($action != 'classify') if ($action != 'classify')
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';