From 76b6120e041fe62f3fbac497c8c0cfbb7cd9b2c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Aug 2005 00:21:13 +0000 Subject: [PATCH] Fix: Onglets manquant sur produits --- htdocs/product/barcode.php | 92 +++++++++++++++++--------------- htdocs/product/fournisseurs.php | 28 +++++----- htdocs/product/photos.php | 12 +++-- htdocs/product/price.php | 29 +++++----- htdocs/product/stats/facture.php | 87 +++++++++++++++--------------- htdocs/product/stats/fiche.php | 12 +++-- 6 files changed, 141 insertions(+), 119 deletions(-) diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php index c44aee16446..a7e11fa7cb5 100644 --- a/htdocs/product/barcode.php +++ b/htdocs/product/barcode.php @@ -52,63 +52,67 @@ $product = new Product($db); $result = $product->fetch($_GET["id"]); - $h=0; +$h=0; - $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans("Card"); - $h++; +$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; +$head[$h][1] = $langs->trans("Card"); +$h++; - $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[$h][1] = $langs->trans("Price"); - $h++; +$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; +$head[$h][1] = $langs->trans("Price"); +$h++; - if($product->type == 0) - { - if ($user->rights->barcode->lire) - { - if ($conf->barcode->enabled) - { - $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; - $head[$h][1] = $langs->trans("BarCode"); - $hselected=$h; - $h++; - } - } - } - - - $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; - $head[$h][1] = $langs->trans("Photos"); - $h++; - - if($product->type == 0) +if($product->type == 0) +{ + if ($user->rights->barcode->lire) { - if ($conf->stock->enabled) + if ($conf->barcode->enabled) { - $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; - $head[$h][1] = $langs->trans("Stock"); + $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; + $head[$h][1] = $langs->trans("BarCode"); + $hselected=$h; $h++; } } +} - if ($conf->fournisseur->enabled) { - $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; - $head[$h][1] = $langs->trans("Suppliers"); + +$head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; +$head[$h][1] = $langs->trans("Photos"); +$h++; + +if($product->type == 0) +{ + if ($conf->stock->enabled) + { + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = $langs->trans("Stock"); $h++; } +} - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans("Statistics"); - $h++; - - //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][1] = $langs->trans('Packs'); - $h++; +if ($conf->fournisseur->enabled) { + $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; + $head[$h][1] = $langs->trans("Suppliers"); + $h++; +} - $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; - $head[$h][1] = $langs->trans("Bills"); - $h++; +$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; +$head[$h][1] = $langs->trans("Statistics"); +$h++; + +//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][1] = $langs->trans('Packs'); + $h++; + +$head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; +$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++; dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 2dee8a2a40d..999a0aac1cc 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -210,19 +210,23 @@ if ($_GET["id"]) $h++; } - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans('Statistics'); - $h++; - - //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][1] = $langs->trans('Packs'); - $h++; - - $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; - $head[$h][1] = $langs->trans('Referers'); - $h++; + $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans('Statistics'); + $h++; + + //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][1] = $langs->trans('Packs'); + $h++; + + $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; + $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++; + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print ''; diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 43576f4088b..c081b6c0053 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -141,15 +141,19 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans('Statistics'); $h++; - //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][1] = $langs->trans('Packs'); - $h++; + //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][1] = $langs->trans('Packs'); + $h++; $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; $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++; + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref); print($mesg); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 19c10582d20..3baef787014 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -93,19 +93,18 @@ $head[$h][1] = $langs->trans("Price"); $hselected=$h; $h++; - if($product->type == 0) - { - if ($user->rights->barcode->lire) - { - if ($conf->barcode->enabled) - { - $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; - $head[$h][1] = $langs->trans("BarCode"); - $h++; - } - } - } - +if($product->type == 0) +{ + if ($user->rights->barcode->lire) + { + if ($conf->barcode->enabled) + { + $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; + $head[$h][1] = $langs->trans("BarCode"); + $h++; + } + } +} $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; $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"); $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); print '
'; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index b4f80e032e2..1d9f13636a9 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -67,71 +67,74 @@ if ($_GET["id"]) if ($result > 0) { - /* - * En mode visu - */ + /* + * En mode visu + */ - $h=0; + $h=0; - $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans("Card"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans("Card"); + $h++; - $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[$h][1] = $langs->trans("Price"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; + $head[$h][1] = $langs->trans("Price"); + $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) - { - $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; - $head[$h][1] = $langs->trans("BarCode"); - $h++; - } - } - } - - - $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; - $head[$h][1] = $langs->trans("Photos"); - $h++; - - if($product->type == 0) - { - if ($conf->stock->enabled) - { - $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; - $head[$h][1] = $langs->trans("Stock"); + $head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id; + $head[$h][1] = $langs->trans("BarCode"); $h++; } } + } - if ($conf->fournisseur->enabled) + + $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; + $head[$h][1] = $langs->trans("Photos"); + $h++; + + if($product->type == 0) + { + if ($conf->stock->enabled) { - $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; - $head[$h][1] = $langs->trans("Suppliers"); + $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; + $head[$h][1] = $langs->trans("Stock"); $h++; } + } - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; - $head[$h][1] = $langs->trans('Statistics'); + if ($conf->fournisseur->enabled) + { + $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; + $head[$h][1] = $langs->trans("Suppliers"); $h++; + } + + $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; + $head[$h][1] = $langs->trans('Statistics'); + $h++; //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][1] = $langs->trans('Packs'); $h++; - $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; - $head[$h][1] = $langs->trans('Referers'); - $hselected=$h; - $h++; + $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; + $head[$h][1] = $langs->trans('Referers'); + $hselected=$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 '
'; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 2147096a9a1..65e1900dd5b 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -171,15 +171,19 @@ if ($_GET["id"]) $hselected=$h; $h++; - //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][1] = $langs->trans('Packs'); - $h++; + //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][1] = $langs->trans('Packs'); + $h++; $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; $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++; + dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);