diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 69acccc52eb..4bdc94a05df 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -19,20 +19,27 @@ */ /** - \file htdocs/compta/clients.php - \ingroup compta - \brief Page accueil des clients - \version $Id$ + * \file htdocs/compta/clients.php + * \ingroup compta + * \brief Show list of customers to add an new invoice + * \version $Id$ */ require_once("./pre.inc.php"); - -if (! $user->rights->societe->lire) -accessforbidden(); - require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); +// Secrutiy check +if ($user->societe_id > 0) +{ + $action = ''; + $socid = $user->societe_id; +} + +if (! $user->rights->facture->lire) +accessforbidden(); + + $langs->load("companies"); $page=$_GET["page"]; @@ -46,19 +53,13 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; + /* * View */ llxHeader(); -// Sécurité accés client -if ($user->societe_id > 0) -{ - $action = ''; - $socid = $user->societe_id; -} - if ($action == 'attribute_prefix') { $societe = new Societe($db, $socid);