From 6c7eaa2d47cd029b3df38f99a56f9eb51495f256 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Fri, 15 Apr 2005 20:54:29 +0000 Subject: [PATCH] Fix: Liens onglet manquant --- htdocs/commande/fiche.php | 25 +++++++++++++++-------- htdocs/compta/commande/fiche.php | 35 +++++++++++++++++++++++--------- htdocs/expedition/commande.php | 30 +++++++++++++++++++-------- 3 files changed, 63 insertions(+), 27 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 07e692b6ea9..5f5d2cac48f 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -424,11 +424,15 @@ else $author->fetch(); $h=0; - $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("OrderCard"); - $hselected = $h; - $h++; - + + if ($conf->commande->enabled && $user->rights->commande->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("OrderCard"); + $hselected = $h; + $h++; + } + if ($conf->expedition->enabled && $user->rights->expedition->lire) { $head[$h][0] = DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id; @@ -436,10 +440,13 @@ else $h++; } - $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("ComptaCard"); - $h++; - + if ($conf->compta->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("ComptaCard"); + $h++; + } + dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); /* diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 15dea4b94e4..997ec588b66 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -30,6 +30,7 @@ require("./pre.inc.php"); +$langs->load("sendings"); $langs->load("companies"); $langs->load("bills"); @@ -85,16 +86,30 @@ if ($_GET["id"] > 0) $author->fetch(); $h=0; - $head[0][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; - $head[0][1] = $langs->trans("OrderCard"); - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("ComptaCard"); - $hselected = $h; - $h++; - - dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); + + if ($conf->commande->enabled && $user->rights->commande->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("OrderCard"); + $h++; + } + + if ($conf->expedition->enabled && $user->rights->expedition->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id; + $head[$h][1] = $langs->trans("SendingCard"); + $h++; + } + + if ($conf->compta->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("ComptaCard"); + $hselected = $h; + $h++; + } + + dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); /* * Commande diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 8b6ad36888e..6f796dc1977 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -80,14 +80,28 @@ if ($_GET["id"] > 0) $author->fetch(); $h=0; - $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("OrderCard"); - $h++; - - $head[$h][0] = DOL_URL_ROOT."/expedition/commande.php?id=".$commande->id; - $head[$h][1] = $langs->trans("SendingCard"); - $hselected = $h; - $h++; + + if ($conf->commande->enabled && $user->rights->commande->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("OrderCard"); + $h++; + } + + if ($conf->expedition->enabled && $user->rights->expedition->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id; + $head[$h][1] = $langs->trans("SendingCard"); + $hselected = $h; + $h++; + } + + if ($conf->compta->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("ComptaCard"); + $h++; + } dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); /* -- GitLab