Skip to content

Commit

Permalink
FIX: remove order rights on invoice page
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Aug 9, 2017
1 parent 0960473 commit e96eadb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions htdocs/fourn/facture/card.php
Expand Up @@ -269,7 +269,7 @@
}

// 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');

Expand Down Expand Up @@ -297,13 +297,13 @@
}

// 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'));
}

// 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'));
}
Expand Down Expand Up @@ -1989,16 +1989,16 @@

$morehtmlref='<div class="refidno">';
// Ref supplier
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->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->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->facture->creer, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->fournisseur->commande->creer)
if ($user->rights->fournisseur->facture->creer)
{
if ($action != 'classify')
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
Expand Down

0 comments on commit e96eadb

Please sign in to comment.