Affichage de l'onglet si le module stock est activé

This commit is contained in:
Rodolphe Quiedeville 2004-11-16 16:44:54 +00:00
parent 62dcf483a5
commit 17cce03d12

View File

@ -332,10 +332,10 @@ else
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">'; print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>'; print '</form></div>';
$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");
$hselected = $h; $hselected = $h;
$h++; $h++;
@ -343,13 +343,21 @@ else
$head[$h][1] = $langs->trans("Price"); $head[$h][1] = $langs->trans("Price");
$h++; $h++;
if($product->type == 0) if($product->type == 0)
{ {
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id; if ($conf->stock->enabled)
$head[$h][1] = 'Stock'; {
$h++; $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
} $head[$h][1] = 'Stock';
$h++;
}
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
$head[$h][1] = 'Fournisseurs';
$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++;