Fix: Onglets manquant sur produits

This commit is contained in:
Laurent Destailleur 2005-08-25 00:21:13 +00:00
parent c038049adf
commit 76b6120e04
6 changed files with 141 additions and 119 deletions

View File

@ -52,18 +52,18 @@ $product = new Product($db);
$result = $product->fetch($_GET["id"]); $result = $product->fetch($_GET["id"]);
$h=0; $h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Card"); $head[$h][1] = $langs->trans("Card");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
$head[$h][1] = $langs->trans("Price"); $head[$h][1] = $langs->trans("Price");
$h++; $h++;
if($product->type == 0) if($product->type == 0)
{ {
if ($user->rights->barcode->lire) if ($user->rights->barcode->lire)
{ {
if ($conf->barcode->enabled) if ($conf->barcode->enabled)
@ -74,41 +74,45 @@ $result = $product->fetch($_GET["id"]);
$h++; $h++;
} }
} }
} }
$head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id;
$head[$h][1] = $langs->trans("Photos"); $head[$h][1] = $langs->trans("Photos");
$h++; $h++;
if($product->type == 0) if($product->type == 0)
{ {
if ($conf->stock->enabled) if ($conf->stock->enabled)
{ {
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
$head[$h][1] = $langs->trans("Stock"); $head[$h][1] = $langs->trans("Stock");
$h++; $h++;
} }
} }
if ($conf->fournisseur->enabled) { if ($conf->fournisseur->enabled) {
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
$head[$h][1] = $langs->trans("Suppliers"); $head[$h][1] = $langs->trans("Suppliers");
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
$head[$h][1] = $langs->trans("Statistics"); $head[$h][1] = $langs->trans("Statistics");
$h++; $h++;
//erics: pour créer des produits composés de x 'sous' produits //erics: pour créer des produits composés de x 'sous' produits
$head[$h][0] = DOL_URL_ROOT."/product/pack.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/pack.php?id=".$product->id;
$head[$h][1] = $langs->trans('Packs'); $head[$h][1] = $langs->trans('Packs');
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id;
$head[$h][1] = $langs->trans("Bills"); $head[$h][1] = $langs->trans("Referers");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);

View File

@ -221,6 +221,10 @@ if ($_GET["id"])
$head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id;
$head[$h][1] = $langs->trans('Referers'); $head[$h][1] = $langs->trans('Referers');
$h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++; $h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);

View File

@ -150,6 +150,10 @@ if ($_GET["id"])
$head[$h][1] = $langs->trans('Referers'); $head[$h][1] = $langs->trans('Referers');
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
print($mesg); print($mesg);

View File

@ -93,8 +93,8 @@ $head[$h][1] = $langs->trans("Price");
$hselected=$h; $hselected=$h;
$h++; $h++;
if($product->type == 0) if($product->type == 0)
{ {
if ($user->rights->barcode->lire) if ($user->rights->barcode->lire)
{ {
if ($conf->barcode->enabled) if ($conf->barcode->enabled)
@ -104,8 +104,7 @@ $h++;
$h++; $h++;
} }
} }
} }
$head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id;
$head[$h][1] = $langs->trans("Photos"); $head[$h][1] = $langs->trans("Photos");
@ -140,6 +139,10 @@ $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id;
$head[$h][1] = $langs->trans("Referers"); $head[$h][1] = $langs->trans("Referers");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -130,6 +130,9 @@ if ($_GET["id"])
$hselected=$h; $hselected=$h;
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);

View File

@ -180,6 +180,10 @@ if ($_GET["id"])
$head[$h][1] = $langs->trans('Referers'); $head[$h][1] = $langs->trans('Referers');
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$product->id;
$head[$h][1] = $langs->trans('Documents');
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);