Update fournisseurs.php

This commit is contained in:
Laurent Destailleur 2018-02-14 20:36:13 +01:00 committed by GitHub
parent 24cc687724
commit 23ee6748f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,8 +51,6 @@ $cost_price=GETPOST('cost_price', 'alpha');
$backtopage=GETPOST('backtopage','alpha');
$error=0;
if (!$user->rights->fournisseur->lire) accessforbidden();
// If socid provided by ajax company selector
if (! empty($_REQUEST['search_fourn_id']))
{
@ -67,6 +65,8 @@ $fieldtype = (! empty($ref) ? 'ref' : 'rowid');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
if (empty($user->rights->fournisseur->lire)) accessforbidden();
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');