diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 71a163ae2e0..02520469d84 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -37,7 +37,6 @@ if (!$user->rights->societe->lire) accessforbidden(); $langs->load("commercial"); -$langs->load("orders"); // Securite acces client $socid=''; @@ -50,11 +49,6 @@ if ($user->societe_id > 0) $max=5; - -if ($conf->propal->enabled) $propalstatic=new Propal($db); - - - /* * Actions */ @@ -97,7 +91,13 @@ print_fiche_titre($langs->trans("CustomerArea")); print ''; -print ''; +if (($conf->propal->enabled && $user->rights->propale->lire) || + ($conf->contrat->enabled && $user->rights->contrat->lire) || + ($conf->commande->enabled && $user->rights->commande->lire)) +{ + print ''; + print '
'; +print '
'; +} // Recherche Propal if ($conf->propal->enabled && $user->rights->propale->lire) @@ -202,6 +202,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) if ($conf->commande->enabled && $user->rights->commande->lire) { $langs->load("orders"); + $sql = "SELECT c.rowid, c.ref, c.total_ttc, s.rowid as socid, s.nom, s.client"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -250,7 +251,17 @@ if ($conf->commande->enabled && $user->rights->commande->lire) } } -print ''; +if (($conf->propal->enabled && $user->rights->propale->lire) || + ($conf->contrat->enabled && $user->rights->contrat->lire) || + ($conf->commande->enabled && $user->rights->commande->lire)) +{ + print ''; +} +else +{ + print ''; +} @@ -264,7 +275,6 @@ $max=3; if ($conf->propal->enabled && $user->rights->propale->lire) { - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 7f9df5d7ccd..edca0eaae74 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -99,12 +99,18 @@ print_fiche_titre($langs->trans("AccountancyTreasuryArea")); print ''; -print ''; + +if (($conf->facture->enabled && $user->rights->facture->lire) || + ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)) +{ + print '
'; +print '
'; +} /* * Find invoices */ -if ($conf->facture->enabled) +if ($conf->facture->enabled && $user->rights->facture->lire) { print '
'; print ''; @@ -117,7 +123,7 @@ if ($conf->facture->enabled) print "

"; } -if ($conf->fournisseur->enabled) +if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire) { print '
'; print ''; @@ -279,8 +285,16 @@ if ($conf->facture->enabled && $user->rights->facture->lire) } } - -print ''; + print '
'; +if (($conf->facture->enabled && $user->rights->facture->lire) || + ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)) +{ + print ''; +} +else +{ + print ''; +} // Last customers