diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 84c534ee49d..7d8e6b7ae2e 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -45,6 +45,7 @@ if ($action == 'add')
$product->price = $HTTP_POST_VARS["price"];
$product->tva_tx = $HTTP_POST_VARS["tva_tx"];
$product->type = $HTTP_POST_VARS["type"];
+ $product->envente = $HTTP_POST_VARS["statut"];
$product->description = $HTTP_POST_VARS["desc"];
$product->duration_value = $HTTP_POST_VARS["duration_value"];
$product->duration_unit = $HTTP_POST_VARS["duration_unit"];
@@ -59,7 +60,7 @@ if ($action == 'addinpropal')
$propal = New Propal($db);
$propal->fetch($HTTP_POST_VARS["propalid"]);
- $result = $propal->insert_product($id, $HTTP_POST_VARS["qty"]);
+ $result = $propal->insert_product($id, $HTTP_POST_VARS["qty"], $HTTP_POST_VARS["remise_percent"]);
if ( $result < 0)
{
$mesg = "erreur $result";
@@ -195,7 +196,13 @@ if ($action == 'create')
$html = new Form($db);
print $html->select_tva("tva_tx");
print '';
- if ($_GET["type"] == 0)
+ print '
| Statut | ';
+ print ' |
';
+
+ if ($_GET["type"] == 0 && defined("MAIN_MODULE_STOCK"))
{
print "".'| Seuil stock | ';
print '';
@@ -292,23 +299,26 @@ else
print ' |
';
print '| Taux TVA | '.$product->tva_tx.' % |
';
- print '| Stock | ';
- if ($product->no_stock)
+ if ($product->type == 0 && defined("MAIN_MODULE_STOCK"))
{
- print "Pas de définition de stock pour ce produit";
- }
- else
- {
- if ($product->stock_reel <= $product->seuil_stock_alerte)
+ print ' |
| Stock | ';
+ if ($product->no_stock)
{
- print ''.$product->stock_reel.' Seuil : '.$product->seuil_stock_alerte;
+ print " | Pas de définition de stock pour ce produit";
}
else
{
+ if ($product->stock_reel <= $product->seuil_stock_alerte)
+ {
+ print ' | '.$product->stock_reel.' Seuil : '.$product->seuil_stock_alerte;
+ }
+ else
+ {
print " | ".$product->stock_reel;
+ }
}
+ print ' |
';
}
- print '';
print "| Description | ".nl2br($product->description)." |
";
if ($product->type == 1)
@@ -414,7 +424,7 @@ else
print '';
}
print '';
- if ($product->type == 0)
+ if ($product->type == 0 && defined("MAIN_MODULE_STOCK"))
{
print "".'| Seuil stock | ';
print '';
@@ -520,8 +530,14 @@ else
print ' | - | ';
}
print '- | ';
-
-print 'Correction stock | ';
+if ($product->type == 0 && defined("MAIN_MODULE_STOCK"))
+{
+ print 'Correction stock | ';
+}
+else
+{
+ print '- | ';
+}
print '
';
@@ -564,7 +580,8 @@ if ($id && $action == '' && $product->envente)
print '