diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index d27756e95ad..1691cb32ee6 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -28,12 +28,11 @@ */ require("./pre.inc.php"); +if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); +if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); if (!$user->rights->commercial->main->lire) accessforbidden(); - -if ($conf->contrat->enabled) - require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); $langs->load("commercial"); $langs->load("orders"); @@ -49,7 +48,10 @@ if ($user->societe_id > 0) $max=5; -llxHeader(); + +$propalstatic=new Propal($db); + + /* * Actions @@ -80,16 +82,15 @@ if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark') * Affichage page */ +llxHeader(); + print_fiche_titre($langs->trans("CommercialArea")); print '
';
-
-/*
- * Recherche Propal
- */
+// Recherche Propal
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$var=false;
@@ -547,7 +548,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
$var=true;
print '
"; } @@ -595,9 +598,6 @@ if ($conf->propal->enabled && $user->rights->propale->lire) { $sql .= " ORDER BY p.rowid DESC"; $sql .= $db->plimit($NBMAX, 0); - include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); - $propalstatic=new Propal($db); - if ( $db->query($sql) ) { $num = $db->num_rows(); | |||||||||||||||||||||||