From 45a231a02a9c143805de260fa799eebf8f33dd5d Mon Sep 17 00:00:00 2001 From: dutoit Date: Fri, 5 Sep 2003 06:58:58 +0000 Subject: [PATCH] Bugfix : la quantite par defaut = 1 pour une ligne libre --- htdocs/comm/propal.php3 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php3 b/htdocs/comm/propal.php3 index 7f69bc8e501..040c950c14f 100644 --- a/htdocs/comm/propal.php3 +++ b/htdocs/comm/propal.php3 @@ -19,6 +19,12 @@ * $Source$ * */ + +/** +* Gestion d'une proposition commerciale +* @package propale +*/ + require("./pre.inc.php3"); $user->getrights('propale'); @@ -135,6 +141,9 @@ if ($HTTP_POST_VARS["action"] == 'addproduct' && $user->rights->propale->creer) */ $propal = new Propal($db); $propal->id = $propalid; + + if (empty ($HTTP_POST_VARS["np_qty"])) + $HTTP_POST_VARS["np_qty"]=1; $propal->insert_product_generic($HTTP_POST_VARS["np_desc"], $HTTP_POST_VARS["np_price"], $HTTP_POST_VARS["np_qty"], @@ -410,7 +419,7 @@ if ($propalid) print ''; print ''; print $html->select_tva("np_tva_tx") . ''; - print ''; + print ''; print ''; print '';