diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php
index 2b7a3f3b46a..41b0c32445b 100644
--- a/htdocs/product/composition/fiche.php
+++ b/htdocs/product/composition/fiche.php
@@ -24,7 +24,7 @@
* \file htdocs/product/composition/fiche.php
* \ingroup product
* \brief Page de la fiche produit
- * \version $Id: fiche.php,v 1.10 2011/08/10 10:00:48 simnandez Exp $
+ * \version $Id: fiche.php,v 1.11 2011/08/10 11:53:25 eldy Exp $
*/
require("../../main.inc.php");
@@ -136,7 +136,7 @@ if($action == 'search' )
$sql.= " WHERE p.entity = ".$conf->entity;
if($key != "")
{
- if ($conf->global->MAIN_MULTILANGS)
+ if ($conf->global->MAIN_MULTILANGS)
{
$sql.= " AND (p.ref like '%".$key."%'";
$sql.= " OR pl.label like '%".$key."%')";
@@ -205,8 +205,8 @@ if ($id || $ref)
print '
| '.$langs->trans("AssociatedProductsNumber").' | '.sizeof($product->get_arbo_each_prod()).' | ';
dol_fiche_end();
-
-
+
+
// List of subproducts
$prods_arbo = $product->get_arbo_each_prod();
if(sizeof($prods_arbo) > 0)
@@ -219,14 +219,14 @@ if ($id || $ref)
$productstatic->id=$value['id'];
$productstatic->type=$value['type'];
$productstatic->ref=$value['fullpath'];
- $productstatic->load_stock();
+ if ($conf->stock->enabled) $productstatic->load_stock();
//var_dump($value);
//print ''.$productstatic->ref.'
';
//print $productstatic->getNomUrl(1).'
';
//print $value[0]; // This contains a tr line.
print '
';
- print '| '.$productstatic->getNomUrl(1).'    | ';
- print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.' ('.$value['nb'].') | ';
+ print ''.$productstatic->getNomUrl(1).' ('.$value['nb'].')     | ';
+ if ($conf->stock->enabled) print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.' | ';
print '
';
}
print '';
@@ -281,14 +281,14 @@ if ($id || $ref)
$productstatic->id=$value['id'];
$productstatic->type=$value['type'];
$productstatic->ref=$value['fullpath'];
- $productstatic->load_stock();
+ if ($conf->stock->enabled) $productstatic->load_stock();
//var_dump($value);
//print ''.$productstatic->ref.'
';
//print $productstatic->getNomUrl(1).'
';
//print $value[0]; // This contains a tr line.
print '';
- print '| '.$productstatic->getNomUrl(1).'    | ';
- print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.' ('.$value['nb'].') | ';
+ print ''.$productstatic->getNomUrl(1).' ('.$value['nb'].')     | ';
+ if ($conf->stock->enabled) print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.' | ';
print '
';
}
print '';
@@ -298,29 +298,31 @@ if ($id || $ref)
print '';
dol_fiche_end();
-
+
print '
';
+ print_fiche_titre($langs->trans("ProductToAddSearch"),'','');
print '';
if($action == 'search')
@@ -411,7 +413,7 @@ if ($id || $ref)
}
print '';
print '';
-
+
if($num > 0)
{
print '
trans("Update").'">';
@@ -449,5 +451,5 @@ print "\n\n";
$db->close();
-llxFooter('$Date: 2011/08/10 10:00:48 $ - $Revision: 1.10 $');
+llxFooter('$Date: 2011/08/10 11:53:25 $ - $Revision: 1.11 $');
?>