diff --git a/htdocs/product/fiche.php3 b/htdocs/product/fiche.php3 index a14f2d7d014..27c5a8c00a5 100644 --- a/htdocs/product/fiche.php3 +++ b/htdocs/product/fiche.php3 @@ -20,6 +20,9 @@ * */ +$types[0] = "produit"; +$types[1] = "service"; + require("./pre.inc.php3"); require("../propal.class.php3"); require("../facture.class.php3"); @@ -33,10 +36,11 @@ if ($action == 'add') { $product = new Product($db); - $product->ref = $HTTP_POST_VARS["ref"]; - $product->libelle = $HTTP_POST_VARS["libelle"]; - $product->price = $HTTP_POST_VARS["price"]; - $product->tva_tx = $HTTP_POST_VARS["tva_tx"]; + $product->ref = $HTTP_POST_VARS["ref"]; + $product->libelle = $HTTP_POST_VARS["libelle"]; + $product->price = $HTTP_POST_VARS["price"]; + $product->tva_tx = $HTTP_POST_VARS["tva_tx"]; + $product->type = $HTTP_POST_VARS["type"]; $product->description = $HTTP_POST_VARS["desc"]; $id = $product->create($user); @@ -51,7 +55,7 @@ if ($action == 'addinpropal') $propal->insert_product($id, $HTTP_POST_VARS["qty"]); $action = ''; - $mesg = 'Produit ajouté à la proposition '; + $mesg = ucfirst($types[$type]) . ' ajouté à la proposition '; $mesg .= ''.$propal->ref.''; } @@ -99,9 +103,9 @@ if ($action == 'update' && $cancel <> 'Annuler') if ($action == 'create') { print "